Run Rector on your code to see what it can do for you:
<?php - if ($this->lastInsertedId !== null && $result[\array_key_first($result)] === null) { - $result[\array_key_first($result)] = $this->lastInsertedId; + if ($this->lastInsertedId !== null && array_first($result) === null) { + array_first($result) = $this->lastInsertedId; }
Applied Rules:
Not a change you expect?
rector.php