Repository navigation
Reject laminas-db typed parameters in Expression - #268
Merged
simon-mundy merged 2 commits intoDec 1, 2026
Merged
Annotations
1 warning and 2 notices
|
Analyze:
src/ResultSet/AbstractResultSet.php#L124
This condition (type `true`) will always evaluate to true.
>Expression of type `true` is always truthy
Because this condition is always true, the code block it controls will always execute if this part of the code is reached.
The explicit condition might be redundant.
Help: Consider simplifying or removing the conditional check if the guarded code should always execute, or verify the expression's logic if a conditional check is truly needed.
|
|
Analyze:
src/TableGateway/AbstractTableGateway.php#L98
Declared return type `false|int|null|string` for `getLastInsertValue` has unused branches: `false`, `string`, `null`.
>Declared as `false|int|null|string`, but `false`, `string`, `null` is never returned.
>No path in this body produces that value.
A return type wider than the body produces is misleading.
Callers must handle branches the function never actually returns.
It can hide dead code paths meant to produce the missing variant.
Help: Remove `false`, `string`, `null` from the return type, giving `int`.
|
|
Analyze:
src/Sql/AbstractSql.php#L383
Redundant null coalesce: left-hand side can never be `null` or undefined.
>This expression (type `PhpDb\Sql\Expression|PhpDb\Sql\Select|PhpDb\Sql\TableIdentifier|string`) is never `null` or undefined
>This right-hand side will never be evaluated
The null coalesce operator `??` only evaluates the right-hand side if the left-hand side is `null` or not set.
Help: Consider removing the `??` operator and the right-hand side expression.
|
background
wait
wait-all
cancel
parallel
Loading