From 2c84154d6e834aabef9393d482edbd164d1aaaaa Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 7 Feb 2023 14:48:08 +0100 Subject: [PATCH] SonarQube code smells resolve #33 --- Source/Config/Autoload.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Config/Autoload.php b/Source/Config/Autoload.php index 3277589..79fc6b4 100644 --- a/Source/Config/Autoload.php +++ b/Source/Config/Autoload.php @@ -7,13 +7,13 @@ class Autoload public static function charger() { if (null !== self::$instance) { - throw new RuntimeException(sprintf('%s is already started', __CLASS__)); + throw RuntimeException(sprintf('%s is already started', __CLASS__)); } self::$instance = new self(); - if (!spl_autoload_register(array(self::$instance, '_autoload'), false)) { + if (!spl_autoload_register(array(self::$instance, 'autoloader'), false)) { throw RuntimeException(sprintf('%s : Could not start the autoload', __CLASS__)); } } @@ -22,7 +22,7 @@ class Autoload { if (null !== self::$instance) { - if(!spl_autoload_unregister(array(self::$instance, '_autoload'))) { + if(!spl_autoload_unregister(array(self::$instance, 'autoloader'))) { throw new RuntimeException('Could not stop the autoload'); } @@ -30,7 +30,7 @@ class Autoload } } - private static function _autoload($className) + private static function autoloader($className) { $folder = "./"; $className = ltrim($className, '\\');