Skip to content

Commit 8c6419e

Browse files
committed
Prefer strict empty-array comparison over empty() call
1 parent 6f5ce1a commit 8c6419e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Persisters/Entity/BasicEntityPersister.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ public function getInsertSQL()
14681468
$columns = $this->getInsertColumnList();
14691469
$tableName = $this->quoteStrategy->getTableName($this->class, $this->platform);
14701470

1471-
if (empty($columns)) {
1471+
if ($columns === []) {
14721472
$identityColumn = $this->quoteStrategy->getColumnName($this->class->identifier[0], $this->class, $this->platform);
14731473

14741474
return $this->platform->getEmptyIdentityInsertSQL($tableName, $identityColumn);

0 commit comments

Comments
 (0)