Skip to content

Commit

Permalink
php function call optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jul 5, 2017
1 parent c26ea1b commit 762bb04
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Handler/Logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/Writer/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/Writer/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/HeroTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Listener/Mvc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/Expressive.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 762bb04

Please sign in to comment.