Skip to content
Snippets Groups Projects
Unverified Commit 54e8b472 authored by Klaus Purer's avatar Klaus Purer Committed by GitHub
Browse files

style(phpstan): Upgrade PHPStan to 1.x

parent 9370a25b
Branches
Tags
No related merge requests found
......@@ -119,7 +119,7 @@ class TodoCommentSniff implements Sniff
* @param int $stackPtr The position of the current token
* in the stack passed in $tokens.
* @param string $comment The comment text.
* @param array<array> $tokens The token data.
* @param array<int, mixed> $tokens The token data.
*
* @return void
*/
......
......@@ -46,7 +46,7 @@ class LineLengthSniff extends GenericLineLengthSniff
* Checks if a line is too long.
*
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
* @param array<int, array> $tokens The token stack.
* @param array<int, mixed> $tokens The token stack.
* @param int $stackPtr The first token on the next line.
*
* @return void
......
......@@ -54,7 +54,7 @@ abstract class FunctionCall implements Sniff
/**
* Internal cache to save the calculated arguments of the function call.
*
* @var array<int, array>
* @var array<int, mixed>
*/
protected $arguments;
......
......@@ -28,6 +28,6 @@
},
"require-dev": {
"phpunit/phpunit": "^6.0 || ^7.0 || ^8.0",
"phpstan/phpstan": "^0.12.63"
"phpstan/phpstan": "^1.2.0"
}
}
......@@ -38,16 +38,24 @@ parameters:
message: "#^Result of \\|\\| is always true\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php
-
message: "#^Offset 0\\|non\\-empty\\-string on array\\{\\} in isset\\(\\) does not exist\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php
-
message: "#^Result of \\|\\| is always true\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/DuplicateEntrySniff.php
-
message: "#^Call to function array_key_exists\\(\\) with mixed and array\\(\\) will always evaluate to false\\.$#"
message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/DuplicateEntrySniff.php
-
message: "#^Call to function array_key_exists\\(\\) with mixed and array\\{\\} will always evaluate to false\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/DuplicateEntrySniff.php
-
message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#"
message: "#^Offset 0\\|non\\-empty\\-string on array\\{\\} in isset\\(\\) does not exist\\.$#"
count: 1
path: coder_sniffer/Drupal/Sniffs/InfoFiles/DuplicateEntrySniff.php
# We don't want to introduce abstract methods for the 2 calls because
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment