Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,46 @@
/**
* Stores the configuration used to run PHPCS and PHPCBF.
*
* @property string[] $files The files and directories to check.
* @property string[] $standards The standards being used for checking.
* @property int $verbosity How verbose the output should be.
* 0: no unnecessary output
* 1: basic output for files being checked
* 2: ruleset and file parsing output
* 3: sniff execution output
* @property bool $interactive Enable interactive checking mode.
* @property int $parallel Check files in parallel.
* @property bool $cache Enable the use of the file cache.
* @property bool $cacheFile A file where the cache data should be written
* @property bool $colors Display colours in output.
* @property bool $explain Explain the coding standards.
* @property bool $local Process local files in directories only (no recursion).
* @property bool $showSources Show sniff source codes in report output.
* @property bool $showProgress Show basic progress information while running.
* @property bool $quiet Quiet mode; disables progress and verbose output.
* @property bool $annotations Process phpcs: annotations.
* @property int $tabWidth How many spaces each tab is worth.
* @property string $encoding The encoding of the files being checked.
* @property string[] $sniffs The sniffs that should be used for checking.
* If empty, all sniffs in the supplied standards will be used.
* @property string[] $exclude The sniffs that should be excluded from checking.
* If empty, all sniffs in the supplied standards will be used.
* @property string[] $ignored Regular expressions used to ignore files and folders during checking.
* @property string $reportFile A file where the report output should be written.
* @property string $generator The documentation generator to use.
* @property string $filter The filter to use for the run.
* @property string[] $bootstrap One of more files to include before the run begins.
* @property int $reportWidth The maximum number of columns that reports should use for output.
* Set to "auto" for have this value changed to the width of the terminal.
* @property int $errorSeverity The minimum severity an error must have to be displayed.
* @property int $warningSeverity The minimum severity a warning must have to be displayed.
* @property bool $recordErrors Record the content of error messages as well as error counts.
* @property string $suffix A suffix to add to fixed files.
* @property string $basepath A file system location to strip from the paths of files shown in reports.
* @property bool $stdin Read content from STDIN instead of supplied files.
* @property string $stdinContent Content passed directly to PHPCS on STDIN.
* @property string $stdinPath The path to use for content passed on STDIN.
* @property bool $trackTime Whether or not to track sniff run time.
* @property string[] $files The files and directories to check.
* @property string[] $standards The standards being used for checking.
* @property int $verbosity How verbose the output should be.
* 0: no unnecessary output
* 1: basic output for files being checked
* 2: ruleset and file parsing output
* 3: sniff execution output
* @property bool $interactive Enable interactive checking mode.
* @property int $parallel Check files in parallel.
* @property bool $cache Enable the use of the file cache.
* @property string $cacheFile Path to the file where the cache data should be written
* @property bool $colors Display colours in output.
* @property bool $explain Explain the coding standards.
* @property bool $local Process local files in directories only (no recursion).
* @property bool $showSources Show sniff source codes in report output.
* @property bool $showProgress Show basic progress information while running.
* @property bool $quiet Quiet mode; disables progress and verbose output.
* @property bool $annotations Process phpcs: annotations.
* @property int $tabWidth How many spaces each tab is worth.
* @property string $encoding The encoding of the files being checked.
* @property string[] $sniffs The sniffs that should be used for checking.
* If empty, all sniffs in the supplied standards will be used.
* @property string[] $exclude The sniffs that should be excluded from checking.
* If empty, all sniffs in the supplied standards will be used.
* @property string[] $ignored Regular expressions used to ignore files and folders during checking.
* @property string $reportFile A file where the report output should be written.
* @property string $generator The documentation generator to use.
* @property string $filter The filter to use for the run.
* @property string[] $bootstrap One of more files to include before the run begins.
* @property int|string $reportWidth The maximum number of columns that reports should use for output.
* Set to "auto" for have this value changed to the width of the terminal.
* @property int $errorSeverity The minimum severity an error must have to be displayed.
* @property int $warningSeverity The minimum severity a warning must have to be displayed.
* @property bool $recordErrors Record the content of error messages as well as error counts.
* @property string $suffix A suffix to add to fixed files.
* @property string $basepath A file system location to strip from the paths of files shown in reports.
* @property bool $stdin Read content from STDIN instead of supplied files.
* @property string $stdinContent Content passed directly to PHPCS on STDIN.
* @property string $stdinPath The path to use for content passed on STDIN.
* @property bool $trackTime Whether or not to track sniff run time.
*
* @property array<string, string> $extensions File extensions that should be checked, and what tokenizer to use.
* E.g., array('inc' => 'PHP');
Expand Down Expand Up @@ -169,7 +169,7 @@ class Config
/**
* Command line values that the user has supplied directly.
*
* @var array<string, TRUE>
* @var array<string, true|array<string, true>>
*/
private static $overriddenDefaults = [];

Expand Down
8 changes: 4 additions & 4 deletions src/Reports/Performance.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class Performance implements Report
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
* its data should be counted in the grand totals.
*
* @param array $report Prepared report data.
* @param \PHP_CodeSniffer\File $phpcsFile The file being reported on.
* @param bool $showSources Show sources?
* @param int $width Maximum allowed line width.
* @param array $report Prepared report data.
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
* @param bool $showSources Show sources?
* @param int $width Maximum allowed line width.
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Ruleset.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Ruleset
* The key is the token name being listened for and the value
* is the sniff object.
*
* @var array<int, \PHP_CodeSniffer\Sniffs\Sniff>
* @var array<int, array<string, array<string, mixed>>>
*/
public $tokenListeners = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Util/Timing.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function startTiming()
/**
* Get the duration of the run up to "now".
*
* @return int Duration in microseconds.
* @return float Duration in microseconds.
*/
public static function getDuration()
{
Expand All @@ -60,7 +60,7 @@ public static function getDuration()
/**
* Convert a duration in microseconds to a human readable duration string.
*
* @param int $duration Duration in microseconds.
* @param float $duration Duration in microseconds.
*
* @return string
*/
Expand Down