Skip to content

Commit 1e9483c

Browse files
authored
Merge pull request #9267 from samsonasik/use-compare-empty-array
refactor: use compare empty array on Forge on keys property
2 parents a9fa3d0 + c8b3804 commit 1e9483c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

phpstan-baseline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@
25182518
$ignoreErrors[] = [
25192519
// identifier: empty.notAllowed
25202520
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
2521-
'count' => 13,
2521+
'count' => 12,
25222522
'path' => __DIR__ . '/system/Database/Forge.php',
25232523
];
25242524
$ignoreErrors[] = [

system/Database/Forge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ public function createTable(string $table, bool $ifNotExists = false, array $att
573573
}
574574

575575
// Most databases don't support creating indexes from within the CREATE TABLE statement
576-
if (! empty($this->keys)) {
576+
if ($this->keys !== []) {
577577
for ($i = 0, $sqls = $this->_processIndexes($table), $c = count($sqls); $i < $c; $i++) {
578578
$this->db->query($sqls[$i]);
579579
}

0 commit comments

Comments
 (0)