Skip to content

Commit dbe245b

Browse files
committed
cs
1 parent a2b674b commit dbe245b

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/QueryReflection/QueryReflection.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
use PHPStan\ShouldNotHappenException;
1414
use PHPStan\TrinaryLogic;
1515
use PHPStan\Type\Accessory\AccessoryNumericStringType;
16-
use PHPStan\Type\ArrayType;
1716
use PHPStan\Type\Constant\ConstantArrayType;
1817
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
1918
use PHPStan\Type\Constant\ConstantIntegerType;
2019
use PHPStan\Type\FloatType;
2120
use PHPStan\Type\IntegerType;
2221
use PHPStan\Type\IntersectionType;
23-
use PHPStan\Type\MixedType;
2422
use PHPStan\Type\StringType;
2523
use PHPStan\Type\Type;
2624
use PHPStan\Type\TypeCombinator;
@@ -416,19 +414,19 @@ public function resolveParameterTypes(Expr $parameter, Scope $scope): Type
416414
{
417415
if ($parameter instanceof Expr\Array_) {
418416
$builder = ConstantArrayTypeBuilder::createEmpty();
419-
foreach($parameter->items as $i => $item) {
417+
foreach ($parameter->items as $i => $item) {
420418
if ($item->key !== null) {
421419
$builder = null;
422420
break;
423421
}
424422

425-
if ($item->unpack){
423+
if ($item->unpack) {
426424
$valueType = $scope->getType($item->value)->getIterableValueType();
427425
} else {
428426
$valueType = $scope->getType($item->value);
429427
}
430428

431-
if (!$valueType->isScalar()->yes()) {
429+
if (! $valueType->isScalar()->yes()) {
432430
$builder = null;
433431
break;
434432
}

tests/rules/SyntaxErrorInPreparedStatementMethodRuleTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,12 @@ public function testBug749(): void
342342
$this->analyse([__DIR__ . '/data/bug-749.php'], [
343343
[
344344
"Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL/MariaDB server version for the right syntax to use near 'table WHERE err-or id IN ('1') LIMIT 0' at line 1 (1064).",
345-
16
345+
16,
346346
],
347347
[
348348
"Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL/MariaDB server version for the right syntax to use near 'table WHERE a='1970-01-01' AND err-or id IN ('1') LIMIT 0' at line 1 (1064).",
349-
30
350-
]
349+
30,
350+
],
351351
]);
352352
}
353353
}

0 commit comments

Comments
 (0)