Skip to content

Commit 31b58b1

Browse files
committed
use null coalesce operator
1 parent 6fb6c8b commit 31b58b1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/HttpsTrait.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,8 @@ private function isSchemeHttps(string $uriScheme) : bool
3030
*/
3131
private function isGoingToBeForcedToHttps($match = null) : bool
3232
{
33-
$is404 = $match === null || ($match instanceof RouteResult && $match->isFailure());
34-
if ($is404) {
35-
if (! isset($this->config['allow_404'])) {
36-
return false;
37-
}
38-
39-
return $this->config['allow_404'];
33+
if ($match === null || ($match instanceof RouteResult && $match->isFailure())) {
34+
return $this->config['allow_404'] ?? false;
4035
}
4136

4237
if ($this->config['force_all_routes']) {

0 commit comments

Comments
 (0)