Skip to content

Commit 642ccb2

Browse files
committed
Merge branch 'master' into 4.x
2 parents 009bce7 + ef429fb commit 642ccb2

File tree

18 files changed

+31
-31
lines changed

18 files changed

+31
-31
lines changed

autoload.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ public static function loadFile(string $path)
188188
/**
189189
* Determine which class was loaded based on the before and after lists of loaded classes.
190190
*
191-
* @param array $classesBeforeLoad The classes/interfaces/traits before the file was included.
192-
* @param array $classesAfterLoad The classes/interfaces/traits after the file was included.
191+
* @param array<string, array<string>> $classesBeforeLoad The classes/interfaces/traits before the file was included.
192+
* @param array<string, array<string>> $classesAfterLoad The classes/interfaces/traits after the file was included.
193193
*
194194
* @return string The fully qualified name of the class in the loaded file.
195195
*/
@@ -262,7 +262,7 @@ public static function addSearchPath(string $path, string $nsPrefix = '')
262262
/**
263263
* Retrieve the namespaces and paths registered by external standards.
264264
*
265-
* @return array
265+
* @return array<string>
266266
*/
267267
public static function getSearchPaths()
268268
{

src/Files/File.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,8 @@ public function getFixedWarningCount()
11991199
/**
12001200
* Retrieve information about the first run.
12011201
*
1202-
* @param $type string
1202+
* @param string $type The type for which to get the "first run" count.
1203+
* Valid values are: 'error', 'warning', 'fixableError' and 'fixableWarning'.
12031204
*
12041205
* @internal This method does not form part of any public API nor backwards compatibility guarantee.
12051206
*

src/Files/LocalFile.php

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

src/Fixer.php

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

src/Reporter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Reporter
9191
/**
9292
* A cache of opened temporary files.
9393
*
94-
* @var array
94+
* @var array<string, string>
9595
*/
9696
private $tmpFiles = [];
9797

@@ -225,7 +225,7 @@ public function __get(string $name)
225225
* @param string $name Property name.
226226
* @param mixed $value Property value.
227227
*
228-
* @return bool
228+
* @return void
229229
*
230230
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException
231231
*/
@@ -240,7 +240,7 @@ public function __set(string $name, $value)
240240
*
241241
* @param string $name Property name.
242242
*
243-
* @return bool
243+
* @return void
244244
*
245245
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException
246246
*/

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
@@ -107,7 +107,7 @@ public function testStdIn($content, $errorCount, $expectedErrors)
107107
/**
108108
* Data provider for testStdIn().
109109
*
110-
* @return array[]
110+
* @return array<string, array<string|int|array>>
111111
*/
112112
public static function dataStdIn()
113113
{

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
@@ -35,7 +35,7 @@ public function register()
3535
* @param int $stackPtr The position of the current
3636
* token in the stack.
3737
*
38-
* @return int|void
38+
* @return int
3939
*/
4040
public function process(File $phpcsFile, int $stackPtr)
4141
{

0 commit comments

Comments
 (0)