From f1fb9a615849ccf72bb75c90773295bbff17a2f6 Mon Sep 17 00:00:00 2001 From: Filippo Montani <78483736+Carnicero90@users.noreply.github.com> Date: Tue, 12 Mar 2024 03:39:22 +0100 Subject: [PATCH] fix: phpstan issue - right side of || always false (#50453) --- src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php | 2 +- src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php b/src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php index f5f0571bca50..7909b197b87b 100644 --- a/src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php +++ b/src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php @@ -30,7 +30,7 @@ public function __construct(array $arguments) public function get($model, $key, $value, $attributes) { - if (! isset($attributes[$key]) || is_null($attributes[$key])) { + if (! isset($attributes[$key])) { return; } diff --git a/src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php b/src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php index ff632ed223cd..926881287ef7 100644 --- a/src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php +++ b/src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php @@ -30,7 +30,7 @@ public function __construct(array $arguments) public function get($model, $key, $value, $attributes) { - if (! isset($attributes[$key]) || is_null($attributes[$key])) { + if (! isset($attributes[$key])) { return; }