Skip to content

Commit 78bfbb6

Browse files
authored
fix cs, ignore test-files (#448)
1 parent 6a172b0 commit 78bfbb6

5 files changed

+10
-7
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
__DIR__.'/src',
66
__DIR__.'/tests',
77
])
8+
->exclude([
9+
'data/',
10+
])
811
->append([
912
__FILE__,
1013
__DIR__.'/bootstrap.php',

src/Rules/QueryPlanAnalyzerRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function processNode(Node $callLike, Scope $scope): array
6969
$queryArgPosition = null;
7070
foreach ($this->classMethods as $classMethod) {
7171
sscanf($classMethod, '%[^::]::%[^#]#%i', $className, $methodName, $queryArgPosition);
72-
if (!is_string($className) || !is_string($methodName) || !is_int($queryArgPosition)) {
72+
if (!\is_string($className) || !\is_string($methodName) || !\is_int($queryArgPosition)) {
7373
throw new ShouldNotHappenException('Invalid classMethod definition');
7474
}
7575

@@ -79,7 +79,7 @@ public function processNode(Node $callLike, Scope $scope): array
7979
}
8080
}
8181

82-
if ($queryArgPosition === null) {
82+
if (null === $queryArgPosition) {
8383
return [];
8484
}
8585

src/Rules/SyntaxErrorInPreparedStatementMethodRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function processNode(Node $callLike, Scope $scope): array
6969
$unsupportedMethod = true;
7070
foreach ($this->classMethods as $classMethod) {
7171
sscanf($classMethod, '%[^::]::%s', $className, $methodName);
72-
if (!is_string($className) || !is_string($methodName)) {
72+
if (!\is_string($className) || !\is_string($methodName)) {
7373
throw new ShouldNotHappenException('Invalid classMethod definition');
7474
}
7575

src/Rules/SyntaxErrorInQueryFunctionRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function processNode(Node $node, Scope $scope): array
6161
$queryArgPosition = null;
6262
foreach ($this->functionNames as $functionName) {
6363
sscanf($functionName, '%[^#]#%i', $functionName, $queryArgPosition);
64-
if (!is_string($functionName) || !is_int($queryArgPosition)) {
64+
if (!\is_string($functionName) || !\is_int($queryArgPosition)) {
6565
throw new ShouldNotHappenException('Invalid functionName definition');
6666
}
6767

@@ -70,7 +70,7 @@ public function processNode(Node $node, Scope $scope): array
7070
}
7171
}
7272

73-
if ($queryArgPosition === null) {
73+
if (null === $queryArgPosition) {
7474
return [];
7575
}
7676

src/Rules/SyntaxErrorInQueryMethodRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function processNode(Node $node, Scope $scope): array
5353
$queryArgPosition = null;
5454
foreach ($this->classMethods as $classMethod) {
5555
sscanf($classMethod, '%[^::]::%[^#]#%i', $className, $methodName, $queryArgPosition);
56-
if (!is_string($className) || !is_string($methodName) || !is_int($queryArgPosition)) {
56+
if (!\is_string($className) || !\is_string($methodName) || !\is_int($queryArgPosition)) {
5757
throw new ShouldNotHappenException('Invalid classMethod definition');
5858
}
5959

@@ -63,7 +63,7 @@ public function processNode(Node $node, Scope $scope): array
6363
}
6464
}
6565

66-
if ($queryArgPosition === null) {
66+
if (null === $queryArgPosition) {
6767
return [];
6868
}
6969

0 commit comments

Comments
 (0)