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
6 changes: 3 additions & 3 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ public static function loadFile($path)
/**
* Determine which class was loaded based on the before and after lists of loaded classes.
*
* @param array $classesBeforeLoad The classes/interfaces/traits before the file was included.
* @param array $classesAfterLoad The classes/interfaces/traits after the file was included.
* @param array<string, array<string>> $classesBeforeLoad The classes/interfaces/traits before the file was included.
* @param array<string, array<string>> $classesAfterLoad The classes/interfaces/traits after the file was included.
*
* @return string The fully qualified name of the class in the loaded file.
*/
Expand Down Expand Up @@ -266,7 +266,7 @@ public static function addSearchPath($path, $nsPrefix='')
/**
* Retrieve the namespaces and paths registered by external standards.
*
* @return array
* @return array<string>
*/
public static function getSearchPaths()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Files/LocalFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public function process()
* and then errors and warnings to be reapplied with the new rules. This is
* particularly useful while caching.
*
* @param array $errors The list of errors to replay.
* @param array $warnings The list of warnings to replay.
* @param array<int, array<int, array<string, mixed>>> $errors The list of errors to replay.
* @param array<int, array<int, array<string, mixed>>> $warnings The list of warnings to replay.
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Fixer
* All changes in changeset must be able to be applied, or else
* the entire changeset is rejected.
*
* @var array
* @var array<int, string>
*/
private $changeset = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Reporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Reporter
/**
* A cache of opened temporary files.
*
* @var array
* @var array<string, string>
*/
private $tmpFiles = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DuplicateClassNameSniff implements Sniff
/**
* List of classes that have been found during checking.
*
* @var array
* @var array<string, array<string, string|int>>
*/
protected $foundClasses = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ class AssignmentInConditionSniff implements Sniff
*
* Set in the register() method.
*
* @var array
* @var array<int|string, int|string>
*/
protected $assignmentTokens = [];

/**
* The tokens that indicate the start of a condition.
*
* @var array
* @var array<int|string, int|string>
*/
protected $conditionStartTokens = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function testStdIn($content, $errorCount, $expectedErrors)
/**
* Data provider for testStdIn().
*
* @return array[]
* @return array<string, array<string|int|array>>
*/
public function dataStdIn()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FunctionCommentSniff implements Sniff
/**
* Array of methods which do not require a return type.
*
* @var array
* @var array<string>
*/
public $specialMethods = [
'__construct',
Expand Down
2 changes: 1 addition & 1 deletion src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function register()
* @param int $stackPtr The position of the current
* token in the stack.
*
* @return int|void
* @return int
*/
public function process(File $phpcsFile, $stackPtr)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class LowercasePHPFunctionsSniff implements Sniff
{

/**
* String -> int hash map of all php built in function names
* Hash map of all php built in function names
*
* @var array
* @var array<string, int>
*/
private $builtInFunctions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class OperatorSpacingSniff implements Sniff
/**
* A list of tokens that aren't considered as operands.
*
* @var string[]
* @var array<int|string, int|string>
*/
private $nonOperandTokens = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class InlineIfDeclarationUnitTest extends AbstractSniffUnitTest
*
* @param string $testFile The name of the file being tested.
*
* @return array
* @return array<string>
*/
public function getCliValues($testFile)
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Core/Config/SniffsExcludeArgsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class SniffsExcludeArgsTest extends TestCase
/**
* Ensure that the expected error message is returned for invalid arguments.
*
* @param string $argument 'sniffs' or 'exclude'.
* @param string $argument Either 'sniffs' or 'exclude'.
* @param string $value List of sniffs to include / exclude.
* @param array<string> $errors Sniff code and associated help text.
* @param string|null $suggestion Help text shown to end user with correct syntax for argument.
Expand Down Expand Up @@ -208,7 +208,7 @@ public static function dataInvalid()
/**
* Ensure that the valid data does not throw an exception, and the value is stored.
*
* @param string $argument 'sniffs' or 'exclude'.
* @param string $argument Either 'sniffs' or 'exclude'.
* @param string $value List of sniffs to include or exclude.
* @param array<string> $result Expected sniffs to be set on the Config object.
*
Expand Down Expand Up @@ -289,7 +289,7 @@ public static function dataValid()
/**
* Ensure that only the first argument is processed and others are ignored.
*
* @param string $argument 'sniffs' or 'exclude'.
* @param string $argument Either 'sniffs' or 'exclude'.
*
* @return void
* @dataProvider dataOnlySetOnce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ final class BackfillAsymmetricVisibilityTest extends AbstractTokenizerTestCase
* Test that the asymmetric visibility keywords are tokenized as such.
*
* @param string $testMarker The comment which prefaces the target token in the test file.
* @param string $testType The expected token type
* @param string $testContent The token content to look for
* @param string $testType The expected token type.
* @param string $testContent The token content to look for.
*
* @dataProvider dataAsymmetricVisibility
*
Expand Down Expand Up @@ -206,8 +206,8 @@ public static function dataAsymmetricVisibility()
* tokenized as such.
*
* @param string $testMarker The comment which prefaces the target token in the test file.
* @param string $testType The expected token type
* @param string $testContent The token content to look for
* @param string $testType The expected token type.
* @param string $testContent The token content to look for.
*
* @dataProvider dataNotAsymmetricVisibility
*
Expand Down
3 changes: 1 addition & 2 deletions tests/Core/Tokenizers/PHP/ExitKeywordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
/**
* Tests the retokenization of the `exit`/`die` keywords to T_EXIT on PHP 8.4 and higher.
*
* @author Juliette Reinders Folmer <phpcs_nospam@adviesenzo.nl>
* @copyright 2024 PHPCSStandards and contributors
* @copyright 2025 PHPCSStandards and contributors
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public function testSwitchDefault($testMarker, $openerMarker, $closerMarker, $co
*
* @see testSwitchDefault()
*
* @return array<string, array<string, string|int>>
* @return array<string, array<string, string|true|null>>
*/
public static function dataSwitchDefault()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Util/Tokens/GetHighestWeightedTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testGetHighestWeightedToken($tokens, $expected)
/**
* Data provider.
*
* @return array<string, array<string, int|false|array<int|string>>>
* @return array<string, array<string, int|string|false|array<int|string>>>
*/
public static function dataGetHighestWeightedToken()
{
Expand Down
Loading