File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 1515
1616class ExceptionHandler
1717{
18- /**
19- * @var resource
20- */
21- private mixed $ outputStream ;
18+ public function __construct (
19+ private string | \ Exception | \ Throwable $ e ,
20+ private readonly mixed $ outputStream = STDERR ,
21+ ) {}
2222
23- /**
24- * @param string|\Exception|\Throwable $e
25- * @param resource $outputStream
26- */
27- public function __construct (string |\Exception |\Throwable $ e , mixed $ outputStream = STDERR )
23+ public function write (): void
2824 {
29- $ this ->outputStream = $ outputStream ;
30- $ message = is_string ($ e ) ? $ e : (string ) $ e ;
31- fwrite ($ this ->outputStream , $ message . PHP_EOL );
25+ fwrite (
26+ $ this ->outputStream ,
27+ (is_string ($ this ->e ) ? $ this ->e : (string ) $ this ->e ) . PHP_EOL
28+ );
3229 }
3330}
You can’t perform that action at this time.
0 commit comments