Skip to content

Commit

Permalink
Exclude PHPMD ErrorControlOperator rule and import class
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jun 28, 2021
1 parent 4e4ea93 commit 882033a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ruleset name="Mess Detector">
<!-- cleancode -->
<rule ref="rulesets/cleancode.xml">
<exclude name="ErrorControlOperator"/>
<exclude name="StaticAccess"/>
</rule>
<!-- codesize -->
Expand Down
4 changes: 3 additions & 1 deletion src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
namespace Framework\Log;

use Error;

/**
* Class Log.
*
Expand Down Expand Up @@ -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
);
}
Expand Down

0 comments on commit 882033a

Please sign in to comment.