diff --git a/src/Illuminate/Foundation/Configuration/Middleware.php b/src/Illuminate/Foundation/Configuration/Middleware.php index 22195364f43e..30e60ed98238 100644 --- a/src/Illuminate/Foundation/Configuration/Middleware.php +++ b/src/Illuminate/Foundation/Configuration/Middleware.php @@ -418,9 +418,7 @@ public function getGlobalMiddleware() ])); $middleware = array_map(function ($middleware) { - return isset($this->replacements[$middleware]) - ? $this->replacements[$middleware] - : $middleware; + return $this->replacements[$middleware] ?? $middleware; }, $middleware); return array_values(array_filter( diff --git a/src/Illuminate/Process/FakeInvokedProcess.php b/src/Illuminate/Process/FakeInvokedProcess.php index 7c445a73f4ff..c82f53c869d1 100644 --- a/src/Illuminate/Process/FakeInvokedProcess.php +++ b/src/Illuminate/Process/FakeInvokedProcess.php @@ -226,7 +226,7 @@ public function latestOutput() $this->nextOutputIndex = $i + 1; } - return isset($output) ? $output : ''; + return $output ?? ''; } /** @@ -249,7 +249,7 @@ public function latestErrorOutput() $this->nextErrorOutputIndex = $i + 1; } - return isset($output) ? $output : ''; + return $output ?? ''; } /** diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index 8a69b6837666..df7b8ec21cc5 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -360,11 +360,7 @@ protected function shouldDispatchAfterCommit($job) return $job->afterCommit; } - if (isset($this->dispatchAfterCommit)) { - return $this->dispatchAfterCommit; - } - - return false; + return $this->dispatchAfterCommit ?? false; } /** diff --git a/src/Illuminate/Testing/Concerns/RunsInParallel.php b/src/Illuminate/Testing/Concerns/RunsInParallel.php index 4a6c475a5bc0..667504343020 100644 --- a/src/Illuminate/Testing/Concerns/RunsInParallel.php +++ b/src/Illuminate/Testing/Concerns/RunsInParallel.php @@ -121,9 +121,7 @@ public function execute(): int }); } - return $potentialExitCode === null - ? $this->getExitCode() - : $potentialExitCode; + return $potentialExitCode ?? $this->getExitCode(); } /**