File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1515use PHPStan \DependencyInjection \Container ;
1616
1717if (!isset ($ container ) || !$ container instanceof Container) {
18- echo 'No container found, or container not of expected type ' . PHP_EOL ;
19- die (-1 );
18+ throw new \RuntimeException ('No container found, or container not of expected type ' );
2019}
2120
2221foreach ($ container ->getServicesByTag ('phpstan.magento.autoloader ' ) as $ autoloader ) {
2322 /** @var Autoloader|object $autoloader */
2423 if (!$ autoloader instanceof Autoloader) {
25- echo 'Services tagged with \'phpstan.magento.autoloader \' must extend ' .
26- 'bitExpert\PHPStan\Magento\Autoload\Autoloader! ' . PHP_EOL .
27- get_class ($ autoloader ) . ' does not. ' . PHP_EOL ;
28- die (-1 );
24+ throw new \RuntimeException (
25+ sprintf (
26+ 'Service "%s" tagged with "phpstan.magento.autoloader" must implement %s! ' ,
27+ get_class ($ autoloader ),
28+ 'bitExpert\PHPStan\Magento\Autoload\Autoloader '
29+ )
30+ );
2931 }
3032
3133 $ autoloader ->register ();
You can’t perform that action at this time.
0 commit comments