Skip to content

Commit

Permalink
Swap empty for array check
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Jul 22, 2023
1 parent 1cc7394 commit ecc447c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Expand Up @@ -1421,7 +1421,7 @@
<code>has</code>
</PossiblyNullReference>
<RedundantCondition>
<code><![CDATA[empty($ret['select_tables'])]]></code>
<code><![CDATA[$ret['select_tables'] === []]]></code>
</RedundantCondition>
</file>
<file src="src/Utils/Routine.php">
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Query.php
Expand Up @@ -528,7 +528,7 @@ public static function getAll($query)
// If no tables names were found in the SELECT clause or if there
// are expressions like * or COUNT(*), etc. tables names should be
// extracted from the FROM clause.
if (empty($ret['select_tables'])) {
if ($ret['select_tables'] === []) {
foreach ($statement->from as $expr) {
if (! isset($expr->table) || ($expr->table === '')) {
continue;
Expand Down

0 comments on commit ecc447c

Please sign in to comment.