From fc747c306d58f0150e8c8f26534174bd6c55be42 Mon Sep 17 00:00:00 2001 From: Alireza Date: Fri, 3 Mar 2023 23:27:25 +0330 Subject: [PATCH] [2.x] shorter if condition --- src/Bootstrappers/BootFiles.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Bootstrappers/BootFiles.php b/src/Bootstrappers/BootFiles.php index e4fbbe26..98bb2dec 100644 --- a/src/Bootstrappers/BootFiles.php +++ b/src/Bootstrappers/BootFiles.php @@ -66,11 +66,7 @@ final class BootFiles implements Bootstrapper */ private function load(string $filename): void { - if (! Str::endsWith($filename, '.php')) { - return; - } - - if (! file_exists($filename)) { + if (! Str::endsWith($filename, '.php') || ! file_exists($filename)) { return; }