From b9fbed2e3d133652d839fb6dcceea4faf6ddd5ee Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Thu, 6 May 2021 21:54:10 +0000 Subject: [PATCH] [CORE] Clarify message when calling non existent method in Entity --- src/Core/Entity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Entity.php b/src/Core/Entity.php index 3516843c72..cf343d6c6b 100644 --- a/src/Core/Entity.php +++ b/src/Core/Entity.php @@ -36,11 +36,11 @@ abstract class Entity if (Formatting::startsWith($name, 'has')) { $prop = Formatting::camelCaseToSnakeCase(Formatting::removePrefix($name, 'has')); // https://wiki.php.net/rfc/closure_apply#proposal - $private_property_accessor = function($prop) { return isset($this->{$prop}); }; + $private_property_accessor = function ($prop) { return isset($this->{$prop}); }; $private_property_accessor = $private_property_accessor->bindTo($this, get_called_class()); return $private_property_accessor($prop); } - throw new \Exception("Entity::{$name} called with bogus arguments: " . print_r($arguments, true)); + throw new \Exception('Non existent method ' . get_called_class() . "::{$name} called with arguments: " . print_r($arguments, true)); } /**