Skip to content

Commit

Permalink
Remove unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
grantholle committed Dec 15, 2023
1 parent c13fdcd commit eedfbae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Scope/Scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected function applyToQuery($query, $table)
return $query->where(function ($query) use ($table) {
$query->whereNull("{$table}.scope");

if ($this->allowNullScope || ! is_null($this->scope)) {
if (! is_null($this->scope)) {
$query->orWhere("{$table}.scope", $this->scope);
}
});
Expand Down

0 comments on commit eedfbae

Please sign in to comment.