From 6dc7e4dbf24f68cb0b3f71c311a70dfe8f72f547 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 26 Dec 2023 04:04:02 +0100 Subject: [PATCH] Docs: various minor fixes --- src/Config.php | 82 ++++++++++++++++++------------------- src/Reports/Performance.php | 8 ++-- src/Ruleset.php | 2 +- src/Util/Timing.php | 4 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/Config.php b/src/Config.php index 756b69a5f1..d92483988b 100644 --- a/src/Config.php +++ b/src/Config.php @@ -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 $extensions File extensions that should be checked, and what tokenizer to use. * E.g., array('inc' => 'PHP'); @@ -169,7 +169,7 @@ class Config /** * Command line values that the user has supplied directly. * - * @var array + * @var array> */ private static $overriddenDefaults = []; diff --git a/src/Reports/Performance.php b/src/Reports/Performance.php index d5b94074d4..78f0f6ae23 100644 --- a/src/Reports/Performance.php +++ b/src/Reports/Performance.php @@ -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 */ diff --git a/src/Ruleset.php b/src/Ruleset.php index 901fb8e09b..2e2493037b 100644 --- a/src/Ruleset.php +++ b/src/Ruleset.php @@ -88,7 +88,7 @@ class Ruleset * The key is the token name being listened for and the value * is the sniff object. * - * @var array + * @var array>> */ public $tokenListeners = []; diff --git a/src/Util/Timing.php b/src/Util/Timing.php index 36f4346343..57470c77ac 100644 --- a/src/Util/Timing.php +++ b/src/Util/Timing.php @@ -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() { @@ -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 */