Skip to content

Commit

Permalink
Try to fix posible null value in isInFrontOf call (PSaml)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonAtrapalo committed Nov 5, 2023
1 parent ff28b2e commit 4275941
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Domain/Rule/DogAcrossToDogRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function __toString(): string

protected function areDogsCorrectlyPlaced(Dog $firstDog, Dog $secondDog): bool
{
if (!$firstDog->isPlaced() || !$secondDog->isPlaced()) {
return true;
}
return $firstDog->getBoardPlace()->isInFrontOf($secondDog->getBoardPlace());
}

Expand Down

0 comments on commit 4275941

Please sign in to comment.