Skip to content

Commit ecc447c

Browse files
committed
Swap empty for array check
Signed-off-by: Kamil Tekiela <[email protected]>
1 parent 1cc7394 commit ecc447c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

psalm-baseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@
14211421
<code>has</code>
14221422
</PossiblyNullReference>
14231423
<RedundantCondition>
1424-
<code><![CDATA[empty($ret['select_tables'])]]></code>
1424+
<code><![CDATA[$ret['select_tables'] === []]]></code>
14251425
</RedundantCondition>
14261426
</file>
14271427
<file src="src/Utils/Routine.php">

src/Utils/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public static function getAll($query)
528528
// If no tables names were found in the SELECT clause or if there
529529
// are expressions like * or COUNT(*), etc. tables names should be
530530
// extracted from the FROM clause.
531-
if (empty($ret['select_tables'])) {
531+
if ($ret['select_tables'] === []) {
532532
foreach ($statement->from as $expr) {
533533
if (! isset($expr->table) || ($expr->table === '')) {
534534
continue;

0 commit comments

Comments
 (0)