From c8157988628a43f3fc01b6e263c2775cd7ac37e2 Mon Sep 17 00:00:00 2001 From: Simon Mundy Date: Mon, 5 Oct 2026 10:40:22 +1100 Subject: [PATCH] Drop the redundant isIdentifier cast in resolveColumnValue() The ColumnReference type already declares isIdentifier as bool, so the (bool) cast is reported as redundant. Signed-off-by: Simon Mundy --- analyzer-baseline.toml | 6 ------ src/Sql/AbstractSql.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/analyzer-baseline.toml b/analyzer-baseline.toml index 77b77f0e..c6d90093 100644 --- a/analyzer-baseline.toml +++ b/analyzer-baseline.toml @@ -1914,12 +1914,6 @@ code = "possibly-undefined-string-array-index" message = 'Possibly undefined array key `string` accessed on `non-empty-array`.' count = 1 -[[issues]] -file = "src/Sql/AbstractSql.php" -code = "redundant-cast" -message = "Redundant cast to `(bool)`: the expression already has this type." -count = 1 - [[issues]] file = "src/Sql/AbstractSql.php" code = "redundant-cast" diff --git a/src/Sql/AbstractSql.php b/src/Sql/AbstractSql.php index e3540f77..6a6852bb 100644 --- a/src/Sql/AbstractSql.php +++ b/src/Sql/AbstractSql.php @@ -443,7 +443,7 @@ protected function resolveColumnValue( $isIdentifier = false; $fromTable = ''; if (is_array($column)) { - $isIdentifier = (bool) ($column['isIdentifier'] ?? false); + $isIdentifier = $column['isIdentifier'] ?? false; $fromTable = $column['fromTable'] ?? ''; $column = $column['column']; }