Skip to content

Commit

Permalink
Fix: Static tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz committed Jan 23, 2020
1 parent ab1b1de commit 61bc535
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
namespace Magento\Framework\Autoload;

use InvalidArgumentException;
use Magento\Framework\Autoload\AutoloaderInterface;

/**
Expand All @@ -23,21 +24,21 @@ class AutoloaderRegistry
* @param AutoloaderInterface $newAutoloader
* @return void
*/
public static function registerAutoloader(AutoloaderInterface $newAutoloader)
public static function registerAutoloader(AutoloaderInterface $newAutoloader): void
{
self::$autoloader = $newAutoloader;
}

/**
* Returns the registered autoloader
*
* @throws \Exception
* @throws InvalidArgumentException
* @return AutoloaderInterface
*/
public static function getAutoloader(): AutoloaderInterface
{
if (!self::$autoloader instanceof AutoloaderInterface) {
throw new \Exception('Autoloader is not registered, cannot be retrieved.');
throw new InvalidArgumentException('Autoloader is not registered, cannot be retrieved.');
}

return self::$autoloader;
Expand Down

0 comments on commit 61bc535

Please sign in to comment.