Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve invalid deprecation that was crashing Dibi analysis in debug mode. #639

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@
$parameterType = $scope->getType($parameterExpr);

if ($parameterType instanceof StringType) {
$resolvedString = $queryReflection->resolveQueryString($parameterExpr, $scope);

if (null === $resolvedString) {
$queryParameters[] = $parameterType;
} else {
$queryParameters[] = $resolvedString;
}
$queryParameters[] = $queryReflection->resolveQueryStrings($parameterExpr, $scope);
} elseif ($parameterType instanceof ConstantArrayType) {
$constantArray = [];

Expand All @@ -132,27 +126,22 @@
}
}

if (! \is_string($queryParameters[0])) {
return [];
}

$stringParameterCount = 0;

foreach ($queryParameters as $queryParameter) {
if (\is_string($queryParameter)) {

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.

Check failure on line 131 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Call to function is_string() with array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type will always evaluate to false.
$stringParameterCount = $stringParameterCount + 1;
}
}

$placeholders = [];
// see https://dibiphp.com/en/documentation#toc-modifiers
preg_match_all('#%(sN|bin|by|lmt|b|iN|f|dt|sql|ex|in|i|l|m|and|or|s|t|d|~?like~?|n|ofs|N)#', $queryParameters[0], $placeholders, \PREG_SET_ORDER);

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 138 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Parameter #2 $subject of function preg_match_all expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.
$placeholderCount = \count($placeholders);
$parameterCount = \count($queryParameters) - 1;

// check that it's not the dibi magic insert statement $this->connection->query('INSERT into apps', ['xx' => ...])
// in that case it does not make sense to validate placeholder count because we know it won't match
if (1 === $stringParameterCount && 'INSERT' !== QueryReflection::getQueryType($queryParameters[0])) {

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Strict comparison using === between 1 and 0 will always evaluate to false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Parameter #1 $query of static method staabm\PHPStanDba\QueryReflection\QueryReflection::getQueryType() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Result of && is always false.

Check failure on line 144 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Strict comparison using === between 1 and 0 will always evaluate to false.
if ($parameterCount !== $placeholderCount) {
$placeholderExpectation = sprintf('Query expects %s placeholder', $placeholderCount);
if ($placeholderCount > 1) {
Expand All @@ -174,7 +163,7 @@
}
}

if ($stringParameterCount > 1) {

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Comparison operation ">" between 0 and 1 is always false.

Check failure on line 166 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Comparison operation ">" between 0 and 1 is always false.
// means syntax like `query('update app set', [...], ' where x = %i', 1)`
return [];
}
Expand All @@ -185,7 +174,7 @@
}

$dibiReflection = new DibiReflection();
$queryParameters[0] = $dibiReflection->rewriteQuery($queryParameters[0]);

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, mysqli, replay)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (reflection replay) (8.1, pdo-mysql, replay)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mariadb:latest, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mariadb:latest, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mariadb:latest, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, mysql:8.0, pdo-mysql, recording, --health-cmd="mysqladmin ping" --health-interval=1...

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, mysql:8.0, mysqli, replay-and-recording, --health-cmd="mysqladmin ping" --health-in...

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

Check failure on line 177 in src/Rules/SyntaxErrorInDibiPreparedStatementMethodRule.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, mysql:8.0, mysqli, recording)

Parameter #1 $queryString of method staabm\PHPStanDba\DibiReflection\DibiReflection::rewriteQuery() expects string, array<int|string, PHPStan\Type\Type>|iterable<string>|PHPStan\Type\Type given.

if (null === $queryParameters[0]) {
return [];
Expand Down
Loading