Skip to content

Commit d549abc

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

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
@@ -1471,7 +1471,7 @@
14711471
<code>has</code>
14721472
</PossiblyNullReference>
14731473
<RedundantCondition>
1474-
<code><![CDATA[empty($ret['select_tables'])]]></code>
1474+
<code><![CDATA[$ret['select_tables'] === []]]></code>
14751475
</RedundantCondition>
14761476
</file>
14771477
<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)