Skip to content

Commit 4725ef6

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

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

phpstan.neon

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

src/HeroTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
use ErrorException;
88
use ErrorHeroModule\Listener\Mvc;
9+
use Laminas\Diactoros\Response;
10+
use Laminas\Diactoros\Response\HtmlResponse;
911
use Laminas\Mvc\MvcEvent;
1012
use Psr\Http\Message\ServerRequestInterface;
1113
use Webmozart\Assert\Assert;
@@ -106,6 +108,7 @@ public function execOnShutdown(): void
106108
// Mezzio project
107109
Assert::implementsInterface($this->request, ServerRequestInterface::class);
108110

111+
/** @var Response|HtmlResponse $result */
109112
$result = $this->exceptionError($errorException);
110113
$this->result = (string) $result->getBody();
111114
}

0 commit comments

Comments
 (0)