From 882033aec910aa1be0564b4641670ed901beda74 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Mon, 28 Jun 2021 12:09:53 -0300 Subject: [PATCH] Exclude PHPMD ErrorControlOperator rule and import class --- phpmd.xml | 1 + src/Log.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/phpmd.xml b/phpmd.xml index 82bf4b6..7cee303 100644 --- a/phpmd.xml +++ b/phpmd.xml @@ -2,6 +2,7 @@ + diff --git a/src/Log.php b/src/Log.php index 62e10f1..17bba25 100644 --- a/src/Log.php +++ b/src/Log.php @@ -9,6 +9,8 @@ */ namespace Framework\Log; +use Error; + /** * Class Log. * @@ -43,7 +45,7 @@ public function __get(string $name) : mixed if (\property_exists($this, $name)) { return $this->{$name}; } - throw new \Error( + throw new Error( 'Undefined property: ' . static::class . '::$' . $name ); }