Skip to content

Commit c0a3996

Browse files
committed
combine if when possible
1 parent ae260b1 commit c0a3996

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/HttpsTrait.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ private function isSchemeHttps(string $uriScheme) : bool
3131
private function isGoingToBeForcedToHttps($match = null) : bool
3232
{
3333
$is404 = $match === null || ($match instanceof RouteResult && $match->isFailure());
34-
if (isset($this->config['allow_404']) &&
35-
$this->config['allow_404'] === true &&
36-
$is404
37-
) {
38-
return true;
39-
}
40-
4134
if ($is404) {
42-
return false;
35+
if (! isset($this->config['allow_404'])) {
36+
return false;
37+
}
38+
39+
return $this->config['allow_404'];
4340
}
4441

4542
Assert::notNull($match);

0 commit comments

Comments
 (0)