Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 0 additions & 12 deletions analyzer-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1782,12 +1782,6 @@ code = "possibly-invalid-argument"
message = 'Possible argument type mismatch for argument #1 of `PhpDb\Adapter\Platform\PlatformInterface::quoteIdentifier`: expected `string`, but possibly received `non-empty-array<string, PhpDb\Sql\Expression|PhpDb\Sql\Select|PhpDb\Sql\TableIdentifier|string>|null|string`.'
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "possibly-invalid-argument"
message = 'Possible argument type mismatch for argument #1 of `PhpDb\Adapter\Platform\PlatformInterface::quoteValue`: expected `string`, but possibly received `bool|int|string`.'
count = 1

[[issues]]
file = "src/Sql/AbstractSql.php"
code = "possibly-invalid-argument"
Expand Down Expand Up @@ -3060,12 +3054,6 @@ code = "possibly-invalid-argument"
message = 'Possible argument type mismatch for argument #1 of `PhpDb\Adapter\Platform\PlatformInterface::quoteIdentifier`: expected `string`, but possibly received `PhpDb\Sql\ExpressionInterface|string`.'
count = 1

[[issues]]
file = "src/Sql/Select.php"
code = "possibly-invalid-argument"
message = 'Possible argument type mismatch for argument #1 of `PhpDb\Adapter\Platform\PlatformInterface::quoteValue`: expected `string`, but possibly received `int|string`.'
count = 2

[[issues]]
file = "src/Sql/Select.php"
code = "possibly-invalid-argument"
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/AbstractSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ protected function resolveColumnValue(

return $isIdentifier
? $fromTable . $platform->quoteIdentifierInFragment($column)
: $platform->quoteValue($column);
: $platform->quoteValue((string) $column);
}

protected function resolveTable(
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ protected function processLimit(
return [$driver->formatParameterName("{$paramPrefix}limit")];
}

return [$platform->quoteValue($this->limit)];
return [$platform->quoteValue((string) $this->limit)];
}

/** @return array{0: string}|null */
Expand All @@ -574,7 +574,7 @@ protected function processOffset(
return [$driver->formatParameterName("{$paramPrefix}offset")];
}

return [$platform->quoteValue($this->offset)];
return [$platform->quoteValue((string) $this->offset)];
}

/** @return array{0: list<list<string>>}|null */
Expand Down
2 changes: 1 addition & 1 deletion test/unit/TestAsset/TrustingSql92Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class TrustingSql92Platform extends Sql92
* {@inheritDoc}
*/
#[Override]
public function quoteValue($value): string
public function quoteValue(string $value): string
{
return $this->quoteTrustedValue($value);
}
Expand Down
Loading