Skip to content

Commit 61bc535

Browse files
committed
Fix: Static tests
1 parent ab1b1de commit 61bc535

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/Autoload/AutoloaderRegistry.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Framework\Autoload;
77

8+
use InvalidArgumentException;
89
use Magento\Framework\Autoload\AutoloaderInterface;
910

1011
/**
@@ -23,21 +24,21 @@ class AutoloaderRegistry
2324
* @param AutoloaderInterface $newAutoloader
2425
* @return void
2526
*/
26-
public static function registerAutoloader(AutoloaderInterface $newAutoloader)
27+
public static function registerAutoloader(AutoloaderInterface $newAutoloader): void
2728
{
2829
self::$autoloader = $newAutoloader;
2930
}
3031

3132
/**
3233
* Returns the registered autoloader
3334
*
34-
* @throws \Exception
35+
* @throws InvalidArgumentException
3536
* @return AutoloaderInterface
3637
*/
3738
public static function getAutoloader(): AutoloaderInterface
3839
{
3940
if (!self::$autoloader instanceof AutoloaderInterface) {
40-
throw new \Exception('Autoloader is not registered, cannot be retrieved.');
41+
throw new InvalidArgumentException('Autoloader is not registered, cannot be retrieved.');
4142
}
4243

4344
return self::$autoloader;

0 commit comments

Comments
 (0)