Skip to content

Commit

Permalink
Fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Dec 24, 2023
1 parent f49c270 commit d4299e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,6 @@ protected function deleteInternal(): false|int
$condition = $this->getOldPrimaryKey(true);
$lock = $this->optimisticLock();

if (is_array($condition) === false) {
return false;
}

if ($lock !== null) {
$condition[$lock] = $this->$lock;
}
Expand Down
6 changes: 1 addition & 5 deletions src/BaseActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public function delete(): false|int
*/
$condition = $this->getOldPrimaryKey(true);

if (is_array($condition) === false) {
return false;
}

$lock = $this->optimisticLock();

if ($lock !== null) {
Expand Down Expand Up @@ -261,7 +257,7 @@ public function getPrimaryKey(bool $asArray = false): mixed
{
$keys = $this->primaryKey();

if (!$asArray && count($keys) === 1) {
if ($asArray === false && count($keys) === 1) {
return $this->attributes[$keys[0]] ?? null;
}

Expand Down

0 comments on commit d4299e0

Please sign in to comment.