File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 88 */
99class ErrorException extends \ErrorException implements NamedException
1010{
11+ //--------------------------------------------------------------------------------------------------------------------
12+ /**
13+ * Map from error codes to error descriptions.
14+ *
15+ * @var array
16+ */
1117 protected static array $ ourNames = [E_COMPILE_ERROR => 'PHP Compile Error ' ,
1218 E_COMPILE_WARNING => 'PHP Compile Warning ' ,
1319 E_CORE_ERROR => 'PHP Core Error ' ,
@@ -25,7 +31,6 @@ class ErrorException extends \ErrorException implements NamedException
2531 E_WARNING => 'PHP Warning ' ];
2632
2733 //--------------------------------------------------------------------------------------------------------------------
28-
2934 /**
3035 * {@inheritdoc}
3136 *
@@ -34,7 +39,7 @@ class ErrorException extends \ErrorException implements NamedException
3439 */
3540 public function getName (): string
3641 {
37- return isset ( self ::$ ourNames [$ this ->getCode ()]) ? self :: $ ourNames [ $ this -> getCode ()] : 'Error ' ;
42+ return self ::$ ourNames [$ this ->getCode ()] ?? 'Error ' ;
3843 }
3944
4045 //--------------------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments