Skip to content

Commit 8fc8559

Browse files
committed
Updated build dependencies
1 parent a1d377e commit 8fc8559

4 files changed

Lines changed: 11 additions & 19 deletions

File tree

‎SlevomatCodingStandard/Helpers/VariableHelper.php‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use function in_array;
88
use function preg_match;
99
use function preg_quote;
10-
use function strlen;
1110
use function strtolower;
1211
use function substr;
1312
use const T_DOUBLE_COLON;
@@ -86,14 +85,8 @@ public static function isUsedInScopeInString(File $phpcsFile, string $variableNa
8685

8786
$stringContent = $tokens[$stringPointer]['content'];
8887

89-
if (preg_match('~(\\\\)?(' . preg_quote($variableName, '~') . ')\b~', $stringContent, $matches) !== 0) {
90-
if ($matches[1] === '') {
91-
return true;
92-
}
93-
94-
if (strlen($matches[1]) % 2 === 1) {
95-
return true;
96-
}
88+
if (preg_match('~(\\\\)?(' . preg_quote($variableName, '~') . ')\b~', $stringContent, $matches) === 1 && $matches[1] === '') {
89+
return true;
9790
}
9891

9992
$variableNameWithoutDollar = substr($variableName, 1);

‎SlevomatCodingStandard/Sniffs/Commenting/EmptyCommentSniff.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private function getCommentContent(File $phpcsFile, int $commentStartPointer, in
120120
return TokenHelper::getContent($phpcsFile, $commentStartPointer + 1, $commentEndPointer - 1);
121121
}
122122

123-
if (preg_match('~^(?://|#)(.*)~', $tokens[$commentStartPointer]['content'], $matches) !== 0) {
123+
if (preg_match('~^(?://|#)(.*)~', $tokens[$commentStartPointer]['content'], $matches) === 1) {
124124
return $matches[1];
125125
}
126126

‎build/PHPStan/phpstan.neon‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ includes:
66
parameters:
77
level: 7
88

9-
checkGenericClassInNonGenericObjectType: false
10-
119
paths:
1210
- %currentWorkingDirectory%/SlevomatCodingStandard
1311

@@ -17,6 +15,7 @@ parameters:
1715
excludePaths:
1816
- %currentWorkingDirectory%/tests/*/data/*
1917
ignoreErrors:
18+
- identifier: missingType.generics
2019
- "#Offset '(bracket|scope|parenthesis|comment|attribute)_(opener|closer)' does not exist#"
2120
- "#Offset '(conditions|scope_condition)' does not exist#"
2221
-

‎composer.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"squizlabs/php_codesniffer": "^3.10.0"
2323
},
2424
"require-dev": {
25-
"phing/phing": "2.17.4",
26-
"php-parallel-lint/php-parallel-lint": "1.3.2",
27-
"phpstan/phpstan": "1.10.60",
28-
"phpstan/phpstan-deprecation-rules": "1.1.4",
29-
"phpstan/phpstan-phpunit": "1.3.16",
30-
"phpstan/phpstan-strict-rules": "1.5.2",
31-
"phpunit/phpunit": "9.6.8|10.5.11"
25+
"phing/phing": "3.0.0",
26+
"php-parallel-lint/php-parallel-lint": "1.4.0",
27+
"phpstan/phpstan": "1.12.8",
28+
"phpstan/phpstan-deprecation-rules": "1.2.1",
29+
"phpstan/phpstan-phpunit": "1.4.0",
30+
"phpstan/phpstan-strict-rules": "1.6.1",
31+
"phpunit/phpunit": "9.6.8|10.5.38|11.4.3"
3232
},
3333
"autoload": {
3434
"psr-4": {

0 commit comments

Comments
 (0)