Skip to content

Commit f81af09

Browse files
committed
Reduce phpstan notice
1 parent 4725ef6 commit f81af09

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ parameters:
1313
ignoreErrors:
1414
- '#function set_error_handler expects (callable(int, string, string, int, array): bool)*#'
1515
- '#Invalid type object to throw#'
16-
- '#Access to an undefined property ErrorHeroModule\\Command\\BaseLoggingCommand\:\:\$request#'
1716
- '#Instanceof between \*NEVER\* and ErrorHeroModule\\Listener\\Mvc will always evaluate to false#'

src/HeroTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
namespace ErrorHeroModule;
66

77
use ErrorException;
8+
use ErrorHeroModule\Command\BaseLoggingCommand;
89
use ErrorHeroModule\Listener\Mvc;
10+
use ErrorHeroModule\Middleware\Mezzio;
911
use Laminas\Diactoros\Response;
1012
use Laminas\Diactoros\Response\HtmlResponse;
1113
use Laminas\Mvc\MvcEvent;
@@ -85,7 +87,7 @@ public function execOnShutdown(): void
8587
$errorException = new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line']);
8688

8789
// laminas-cli
88-
if (! $this instanceof Mvc && ! isset($this->request)) {
90+
if ($this instanceof BaseLoggingCommand) {
8991
ob_start();
9092
$this->exceptionError($errorException);
9193
$this->result = (string) ob_get_clean();

0 commit comments

Comments
 (0)