From eedfbae20b3bcfc1debb573d195635f28edee103 Mon Sep 17 00:00:00 2001 From: Grant Holle Date: Fri, 15 Dec 2023 12:28:44 +0400 Subject: [PATCH] Remove unnecessary conditional --- src/Database/Scope/Scope.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Scope/Scope.php b/src/Database/Scope/Scope.php index 6513cd4..5442f4a 100644 --- a/src/Database/Scope/Scope.php +++ b/src/Database/Scope/Scope.php @@ -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); } });