From 9da2e2df9a6ace9ab58074337e9ae973dbd4e710 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 7 Feb 2023 14:50:23 +0100 Subject: [PATCH] SonarQube code smells resolve #34 --- Source/Config/Autoload.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Config/Autoload.php b/Source/Config/Autoload.php index 79fc6b4..72c9ecb 100644 --- a/Source/Config/Autoload.php +++ b/Source/Config/Autoload.php @@ -22,8 +22,8 @@ class Autoload { if (null !== self::$instance) { - if(!spl_autoload_unregister(array(self::$instance, 'autoloader'))) { - throw new RuntimeException('Could not stop the autoload'); + if (!spl_autoload_unregister(array(self::$instance, 'autoloader'))) { + throw RuntimeException('Could not stop the autoload'); } self::$instance = null; @@ -43,8 +43,6 @@ class Autoload } $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; - include_once $folder.$fileName; + require_once $folder.$fileName; } } - -?>