Skip to content

Commit

Permalink
refactor if else assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Apr 18, 2024
1 parent 32c0bbf commit e75b9c9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/TimeBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,7 @@ public function insert($datum, $priority)
}
elseif($priority instanceof DateTimeInterface)
{
if ($priority instanceof DateTime)
{
$time = DateTimeImmutable::createFromMutable($priority);
}
else
{
$time = $priority;
}
$time = ($priority instanceof DateTime) ? DateTimeImmutable::createFromMutable($priority) : $priority;
}
else
{
Expand Down

0 comments on commit e75b9c9

Please sign in to comment.