Skip to content

Commit df71300

Browse files
authored
Merge pull request #94 from PHPCSStandards/feature/various-doc-fixes
Docs: variety of fixes
2 parents d84144d + 471d44f commit df71300

File tree

73 files changed

+88
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+88
-86
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ The file documents changes to the PHP_CodeSniffer project.
9191
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
9292
- Improved README syntax highlighting
9393
- Thanks to Benjamin Loison (@Benjamin-Loison) for the patch
94+
- Various documentation improvements
95+
- Thanks to Andrew Dawes (@AndrewDawes) and Juliette Reinders Folmer (@jrfnl) for the patches
9496

9597
### Removed
9698
- Removed support for installing via PEAR

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* 2: ruleset and file parsing output
2828
* 3: sniff execution output
2929
* @property bool $interactive Enable interactive checking mode.
30-
* @property bool $parallel Check files in parallel.
30+
* @property int $parallel Check files in parallel.
3131
* @property bool $cache Enable the use of the file cache.
3232
* @property bool $cacheFile A file where the cache data should be written
3333
* @property bool $colors Display colours in output.

src/Files/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ public function addErrorOnLine(
755755

756756

757757
/**
758-
* Records a warning against a specific token in the file.
758+
* Records a warning against a specific line in the file.
759759
*
760760
* @param string $warning The error message.
761761
* @param int $line The line on which the warning occurred.

src/Files/FileList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function current()
199199
/**
200200
* Return the file path of the current file being processed.
201201
*
202-
* @return void
202+
* @return string|null Path name or `null` when the end of the iterator has been reached.
203203
*/
204204
#[ReturnTypeWillChange]
205205
public function key()

src/Fixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Fixer
7070
* If a token is being "fixed" back to its last value, the fix is
7171
* probably conflicting with another.
7272
*
73-
* @var array<int, string>
73+
* @var array<int, array<string, mixed>>
7474
*/
7575
private $oldTokenValues = [];
7676

@@ -349,7 +349,7 @@ public function getTokenContent($stackPtr)
349349
/**
350350
* Start recording actions for a changeset.
351351
*
352-
* @return void
352+
* @return void|false
353353
*/
354354
public function beginChangeset()
355355
{

src/Reports/Hgblame.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Hgblame extends VersionControl
2828
*
2929
* @param string $line Line to parse.
3030
*
31-
* @return mixed string or false if impossible to recover.
31+
* @return string|false String or FALSE if impossible to recover.
3232
*/
3333
protected function getAuthor($line)
3434
{

src/Reports/Info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function generateFileReport($report, File $phpcsFile, $showSources=false,
4545

4646

4747
/**
48-
* Prints the source of all errors and warnings.
48+
* Prints the recorded metrics.
4949
*
5050
* @param string $cachedData Any partial report data that was returned from
5151
* generateFileReport during the run.

src/Reports/Notifysend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function generate(
154154
* @param int $totalErrors Total number of errors found during the run.
155155
* @param int $totalWarnings Total number of warnings found during the run.
156156
*
157-
* @return string Error message or NULL if no error/warning found.
157+
* @return string|null Error message or NULL if no error/warning found.
158158
*/
159159
protected function generateMessage($checkedFiles, $totalErrors, $totalWarnings)
160160
{

src/Ruleset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Ruleset
4747
* The key is the regular expression and the value is the type
4848
* of ignore pattern (absolute or relative).
4949
*
50-
* @var array<string, string>
50+
* @var array<string, array>
5151
*/
5252
public $ignorePatterns = [];
5353

src/Runner.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Runner
4949
/**
5050
* Run the PHPCS script.
5151
*
52-
* @return array
52+
* @return int
5353
*/
5454
public function runPHPCS()
5555
{
@@ -151,7 +151,7 @@ public function runPHPCS()
151151
/**
152152
* Run the PHPCBF script.
153153
*
154-
* @return array
154+
* @return int
155155
*/
156156
public function runPHPCBF()
157157
{
@@ -595,7 +595,7 @@ private function run()
595595
* @param string $file The path of the file that raised the error.
596596
* @param int $line The line number the error was raised at.
597597
*
598-
* @return void
598+
* @return bool
599599
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException
600600
*/
601601
public function handleErrors($code, $message, $file, $line)

0 commit comments

Comments
 (0)