Skip to content

Commit

Permalink
Updated build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Nov 8, 2024
1 parent a1d377e commit ed5bb39
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion SlevomatCodingStandard/Helpers/VariableHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ public static function isUsedInScopeInString(File $phpcsFile, string $variableNa

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

if (preg_match('~(\\\\)?(' . preg_quote($variableName, '~') . ')\b~', $stringContent, $matches) !== 0) {
if (preg_match('~(\\\\)?(' . preg_quote($variableName, '~') . ')\b~', $stringContent, $matches) === 1) {
if ($matches[1] === '') {
return true;
}

/** @phpstan-ignore-next-line */
if (strlen($matches[1]) % 2 === 1) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function getCommentContent(File $phpcsFile, int $commentStartPointer, in
return TokenHelper::getContent($phpcsFile, $commentStartPointer + 1, $commentEndPointer - 1);
}

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

Expand Down
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
passthru="true"
checkreturn="true"
>
<arg value="--blame"/>
<arg path="SlevomatCodingStandard" />
<arg path="tests" />
</exec>
Expand Down
3 changes: 1 addition & 2 deletions build/PHPStan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ includes:
parameters:
level: 7

checkGenericClassInNonGenericObjectType: false

paths:
- %currentWorkingDirectory%/SlevomatCodingStandard

Expand All @@ -17,6 +15,7 @@ parameters:
excludePaths:
- %currentWorkingDirectory%/tests/*/data/*
ignoreErrors:
- identifier: missingType.generics
- "#Offset '(bracket|scope|parenthesis|comment|attribute)_(opener|closer)' does not exist#"
- "#Offset '(conditions|scope_condition)' does not exist#"
-
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"squizlabs/php_codesniffer": "^3.10.0"
},
"require-dev": {
"phing/phing": "2.17.4",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"phpstan/phpstan": "1.10.60",
"phpstan/phpstan-deprecation-rules": "1.1.4",
"phpstan/phpstan-phpunit": "1.3.16",
"phpstan/phpstan-strict-rules": "1.5.2",
"phpunit/phpunit": "9.6.8|10.5.11"
"phing/phing": "3.0.0",
"php-parallel-lint/php-parallel-lint": "1.4.0",
"phpstan/phpstan": "1.12.8",
"phpstan/phpstan-deprecation-rules": "1.2.1",
"phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpunit/phpunit": "9.6.8|10.5.38|11.4.3"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Sniffs/Arrays/data/fixableTrailingCommas.fixed.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

[1, 2, 3];

Expand Down
2 changes: 1 addition & 1 deletion tests/Sniffs/Arrays/data/fixableTrailingCommas.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

[1, 2, 3];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

max(
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

max(
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

max(
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // lint >= 7.3
<?php

max(
0,
Expand Down

0 comments on commit ed5bb39

Please sign in to comment.