Skip to content

Commit 3d661ad

Browse files
committed
Docs: various minor fixes
1 parent 66b2fa9 commit 3d661ad

File tree

17 files changed

+27
-28
lines changed

17 files changed

+27
-28
lines changed

autoload.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ public static function loadFile($path)
190190
/**
191191
* Determine which class was loaded based on the before and after lists of loaded classes.
192192
*
193-
* @param array $classesBeforeLoad The classes/interfaces/traits before the file was included.
194-
* @param array $classesAfterLoad The classes/interfaces/traits after the file was included.
193+
* @param array<string, array<string>> $classesBeforeLoad The classes/interfaces/traits before the file was included.
194+
* @param array<string, array<string>> $classesAfterLoad The classes/interfaces/traits after the file was included.
195195
*
196196
* @return string The fully qualified name of the class in the loaded file.
197197
*/
@@ -266,7 +266,7 @@ public static function addSearchPath($path, $nsPrefix='')
266266
/**
267267
* Retrieve the namespaces and paths registered by external standards.
268268
*
269-
* @return array
269+
* @return array<string>
270270
*/
271271
public static function getSearchPaths()
272272
{

src/Files/LocalFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public function process()
160160
* and then errors and warnings to be reapplied with the new rules. This is
161161
* particularly useful while caching.
162162
*
163-
* @param array $errors The list of errors to replay.
164-
* @param array $warnings The list of warnings to replay.
163+
* @param array<int, array<int, array<string, mixed>>> $errors The list of errors to replay.
164+
* @param array<int, array<int, array<string, mixed>>> $warnings The list of warnings to replay.
165165
*
166166
* @return void
167167
*/

src/Fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Fixer
8282
* All changes in changeset must be able to be applied, or else
8383
* the entire changeset is rejected.
8484
*
85-
* @var array
85+
* @var array<int, string>
8686
*/
8787
private $changeset = [];
8888

src/Reporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Reporter
7777
/**
7878
* A cache of opened temporary files.
7979
*
80-
* @var array
80+
* @var array<string, string>
8181
*/
8282
private $tmpFiles = [];
8383

src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DuplicateClassNameSniff implements Sniff
1919
/**
2020
* List of classes that have been found during checking.
2121
*
22-
* @var array
22+
* @var array<string, array<string, string|int>>
2323
*/
2424
protected $foundClasses = [];
2525

src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ class AssignmentInConditionSniff implements Sniff
2525
*
2626
* Set in the register() method.
2727
*
28-
* @var array
28+
* @var array<int|string, int|string>
2929
*/
3030
protected $assignmentTokens = [];
3131

3232
/**
3333
* The tokens that indicate the start of a condition.
3434
*
35-
* @var array
35+
* @var array<int|string, int|string>
3636
*/
3737
protected $conditionStartTokens = [];
3838

src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testStdIn($content, $errorCount, $expectedErrors)
110110
/**
111111
* Data provider for testStdIn().
112112
*
113-
* @return array[]
113+
* @return array<string, array<string|int|array>>
114114
*/
115115
public function dataStdIn()
116116
{

src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FunctionCommentSniff implements Sniff
2828
/**
2929
* Array of methods which do not require a return type.
3030
*
31-
* @var array
31+
* @var array<string>
3232
*/
3333
public $specialMethods = [
3434
'__construct',

src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function register()
3636
* @param int $stackPtr The position of the current
3737
* token in the stack.
3838
*
39-
* @return int|void
39+
* @return int
4040
*/
4141
public function process(File $phpcsFile, $stackPtr)
4242
{

src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class LowercasePHPFunctionsSniff implements Sniff
1717
{
1818

1919
/**
20-
* String -> int hash map of all php built in function names
20+
* Hash map of all php built in function names
2121
*
22-
* @var array
22+
* @var array<string, int>
2323
*/
2424
private $builtInFunctions;
2525

0 commit comments

Comments
 (0)