diff --git a/src/Handler/Logging.php b/src/Handler/Logging.php index 88318f68..5cc61f05 100644 --- a/src/Handler/Logging.php +++ b/src/Handler/Logging.php @@ -189,7 +189,7 @@ private function collectErrorExceptionData($e) $priority = Logger::$errorPriorityMap[$e->getSeverity()]; $errorType = HeroConstant::ERROR_TYPE[$e->getSeverity()]; } else { - $errorType = get_class($e); + $errorType = \get_class($e); } $errorFile = $e->getFile(); diff --git a/src/Handler/Writer/Db.php b/src/Handler/Writer/Db.php index 1356ff2e..48352b84 100644 --- a/src/Handler/Writer/Db.php +++ b/src/Handler/Writer/Db.php @@ -87,7 +87,7 @@ public function isExists($errorFile, $errorLine, $errorMessage, $errorUrl) $first = $result->current()[$timestamp]; $last = date('Y-m-d H:i:s'); - $diff = strtotime($last) - strtotime($first); + $diff = \strtotime($last) - \strtotime($first); if ($diff <= $this->configLoggingSettings['same-error-log-time-range']) { return true; } diff --git a/src/Handler/Writer/Mail.php b/src/Handler/Writer/Mail.php index a69d7759..6862c505 100644 --- a/src/Handler/Writer/Mail.php +++ b/src/Handler/Writer/Mail.php @@ -56,7 +56,7 @@ public function shutdown() } // Always provide events to mail as plaintext. - $body = implode(PHP_EOL, $this->eventsToMail); + $body = \implode(PHP_EOL, $this->eventsToMail); if (! empty($this->requestData['files_data'])) { $mimePart = new MimePart($body); diff --git a/src/HeroTrait.php b/src/HeroTrait.php index cf4a0f0d..f70ef458 100644 --- a/src/HeroTrait.php +++ b/src/HeroTrait.php @@ -62,7 +62,7 @@ public function phpErrorHandler($errorType, $errorMessage, $errorFile, $errorLin ini_set('display_errors', 0); } - if (in_array($errorType, $this->errorHeroModuleConfig['display-settings']['exclude-php-errors'])) { + if (\in_array($errorType, $this->errorHeroModuleConfig['display-settings']['exclude-php-errors'])) { return; } diff --git a/src/Listener/Mvc.php b/src/Listener/Mvc.php index ced722f9..1f2a48a4 100644 --- a/src/Listener/Mvc.php +++ b/src/Listener/Mvc.php @@ -81,7 +81,7 @@ public function exceptionError(Event $e) $exceptionClass = get_class($exception); if (isset($this->errorHeroModuleConfig['display-settings']['exclude-exceptions']) && - in_array($exceptionClass, $this->errorHeroModuleConfig['display-settings']['exclude-exceptions'])) { + \in_array($exceptionClass, $this->errorHeroModuleConfig['display-settings']['exclude-exceptions'])) { // rely on original mvc process return; } diff --git a/src/Middleware/Expressive.php b/src/Middleware/Expressive.php index 30ea0dbc..ac4734f6 100644 --- a/src/Middleware/Expressive.php +++ b/src/Middleware/Expressive.php @@ -83,7 +83,7 @@ public function exceptionError($e, $request) { $exceptionClass = get_class($e); if (isset($this->errorHeroModuleConfig['display-settings']['exclude-exceptions']) && - in_array($exceptionClass, $this->errorHeroModuleConfig['display-settings']['exclude-exceptions']) + \in_array($exceptionClass, $this->errorHeroModuleConfig['display-settings']['exclude-exceptions']) ) { throw $e; }