Skip to content

Commit c67dd3e

Browse files
committed
assert
1 parent b1a8fbc commit c67dd3e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/HeroTrait.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ trait HeroTrait
2626

2727
public function phpError() : void
2828
{
29-
if ($this instanceof Listener\Mvc && \func_get_args()) {
30-
Assert::isInstanceOf(
31-
$this->mvcEvent = \func_get_arg(0),
32-
MvcEvent::class
33-
);
29+
if ($this instanceof Listener\Mvc) {
30+
Assert::count($args = \func_get_args(), 1);
31+
Assert::isInstanceOf($this->mvcEvent = $args[0], MvcEvent::class);
3432
}
3533

3634
if (! $this->errorHeroModuleConfig['display-settings']['display_errors']) {

0 commit comments

Comments
 (0)