Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 5768cc0

Browse files
committed
CS: Apply ternary_to_null_coalescing fixer
1 parent 5dfc782 commit 5768cc0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ public static function handleFatalError(array $error = null)
636636
if ($error && $error['type'] &= \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR) {
637637
// Let's not throw anymore but keep logging
638638
$handler->throwAt(0, true);
639-
$trace = isset($error['backtrace']) ? $error['backtrace'] : null;
639+
$trace = $error['backtrace'] ?? null;
640640

641641
if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) {
642642
$exception = new OutOfMemoryException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, false, $trace);

Exception/FlattenException.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ public function setTrace($trace, $file, $line)
281281
$this->trace[] = [
282282
'namespace' => $namespace,
283283
'short_class' => $class,
284-
'class' => isset($entry['class']) ? $entry['class'] : '',
285-
'type' => isset($entry['type']) ? $entry['type'] : '',
286-
'function' => isset($entry['function']) ? $entry['function'] : null,
287-
'file' => isset($entry['file']) ? $entry['file'] : null,
288-
'line' => isset($entry['line']) ? $entry['line'] : null,
284+
'class' => $entry['class'] ?? '',
285+
'type' => $entry['type'] ?? '',
286+
'function' => $entry['function'] ?? null,
287+
'file' => $entry['file'] ?? null,
288+
'line' => $entry['line'] ?? null,
289289
'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [],
290290
];
291291
}

0 commit comments

Comments
 (0)