We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2e2646 commit ab1b1deCopy full SHA for ab1b1de
lib/internal/Magento/Framework/Autoload/AutoloaderRegistry.php
@@ -34,12 +34,12 @@ public static function registerAutoloader(AutoloaderInterface $newAutoloader)
34
* @throws \Exception
35
* @return AutoloaderInterface
36
*/
37
- public static function getAutoloader()
+ public static function getAutoloader(): AutoloaderInterface
38
{
39
- if (self::$autoloader !== null) {
40
- return self::$autoloader;
41
- } else {
+ if (!self::$autoloader instanceof AutoloaderInterface) {
42
throw new \Exception('Autoloader is not registered, cannot be retrieved.');
43
}
+
+ return self::$autoloader;
44
45
0 commit comments