From 6d6303d276e28c2fbd21f7ba7c3aad2ae66876e8 Mon Sep 17 00:00:00 2001 From: Mark <14284867+xHeaven@users.noreply.github.com> Date: Sun, 29 Dec 2024 07:19:07 +0100 Subject: [PATCH] Remove unnecessary null coalescing If the return value is `null`, it will return `null` anyway. If the method doesn't exist, it will throw an `Error` because of the undefined method. --- src/Meta/Reflection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Meta/Reflection.php b/src/Meta/Reflection.php index 929ac61..82c3662 100644 --- a/src/Meta/Reflection.php +++ b/src/Meta/Reflection.php @@ -73,6 +73,6 @@ class Reflection return $properties[0]->value; } - return $metaProperty::defaultValue() ?? null; + return $metaProperty::defaultValue(); } }