@@ -37,33 +37,23 @@ final class ErrorHandler
3737 private ?bool $ cli = null ;
3838 private ?int $ terminalWidth = null ;
3939
40- /**
41- * @var null|resource
42- */
40+ /** @var null|resource */
4341 private $ errorOutputStream ;
4442 private bool $ hasColorSupport = false ;
4543 private ?bool $ logErrors = null ;
4644 private bool $ logVariables = true ;
4745 private ?bool $ displayErrors = null ;
4846
49- /**
50- * @var callable
51- */
47+ /** @var callable */
5248 private $ emailCallback ;
5349
54- /**
55- * @var callable
56- */
50+ /** @var callable */
5751 private $ errorLogCallback = '\\error_log ' ;
5852
59- /**
60- * @var array<int, bool>
61- */
53+ /** @var array<int, bool> */
6254 private array $ scream = [];
6355
64- /**
65- * @var array<int, class-string<Throwable>>
66- */
56+ /** @var array<int, class-string<Throwable>> */
6757 private array $ exceptionsTypesFor404 = [];
6858
6959 private bool $ shouldEmail404Exceptions = true ;
@@ -131,9 +121,7 @@ public function getTerminalWidth(): int
131121 return $ this ->terminalWidth ;
132122 }
133123
134- /**
135- * @param mixed $errorOutputStream
136- */
124+ /** @param mixed $errorOutputStream */
137125 public function setErrorOutputStream ($ errorOutputStream ): void
138126 {
139127 if (! \is_resource ($ errorOutputStream )) {
@@ -144,9 +132,7 @@ public function setErrorOutputStream($errorOutputStream): void
144132 $ this ->hasColorSupport = (\function_exists ('posix_isatty ' ) && @\posix_isatty ($ errorOutputStream ));
145133 }
146134
147- /**
148- * @return resource
149- */
135+ /** @return resource */
150136 public function getErrorOutputStream ()
151137 {
152138 if (null === $ this ->errorOutputStream ) {
@@ -197,17 +183,13 @@ public function displayErrors(): bool
197183 return $ this ->displayErrors ;
198184 }
199185
200- /**
201- * @param array<int, bool> $scream
202- */
186+ /** @param array<int, bool> $scream */
203187 public function setScreamSilencedErrors (array $ scream ): void
204188 {
205189 $ this ->scream = $ scream ;
206190 }
207191
208- /**
209- * @return array<int, bool>
210- */
192+ /** @return array<int, bool> */
211193 public function getScreamSilencedErrors (): array
212194 {
213195 return $ this ->scream ;
@@ -465,17 +447,13 @@ private function purgeTrace(string $trace): string
465447 return \defined ('ROOT_PATH ' ) ? \str_replace (ROOT_PATH , '. ' , $ trace ) : $ trace ;
466448 }
467449
468- /**
469- * @param array<int, class-string<Throwable>> $exceptionsTypesFor404
470- */
450+ /** @param array<int, class-string<Throwable>> $exceptionsTypesFor404 */
471451 public function set404ExceptionTypes (array $ exceptionsTypesFor404 ): void
472452 {
473453 $ this ->exceptionsTypesFor404 = $ exceptionsTypesFor404 ;
474454 }
475455
476- /**
477- * @return array<int, class-string<Throwable>>
478- */
456+ /** @return array<int, class-string<Throwable>> */
479457 public function get404ExceptionTypes (): array
480458 {
481459 return $ this ->exceptionsTypesFor404 ;
0 commit comments