@@ -4,29 +4,29 @@ |
||
| 4 | 4 | |
| 5 | 5 | /* Find bootstrap path */ |
| 6 | 6 | $rootPath = realpath(dirname(__FILE__)); |
| 7 | -while (!file_exists($rootPath . '/app/bootstrap.php') || $rootPath == '/') { |
|
| 7 | +while (!file_exists($rootPath.'/app/bootstrap.php') || $rootPath == '/') { |
|
| 8 | 8 | $rootPath = realpath(dirname($rootPath)); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | /* Include Magento bootstrap file */ |
| 12 | -require_once $rootPath . '/app/bootstrap.php'; |
|
| 12 | +require_once $rootPath.'/app/bootstrap.php'; |
|
| 13 | 13 | |
| 14 | 14 | /* Create git hook class autoloader */ |
| 15 | 15 | $_git_hook_loaded_class = []; |
| 16 | 16 | function phpstan_magento2_autoloader($class) { |
| 17 | 17 | global $_git_hook_loaded_class; |
| 18 | - if(isset($_git_hook_loaded_class[$class])) { |
|
| 18 | + if (isset($_git_hook_loaded_class[$class])) { |
|
| 19 | 19 | return $_git_hook_loaded_class[$class]; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | try { |
| 23 | 23 | /* Get Magento ObjectManager */ |
| 24 | 24 | $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); |
| 25 | - $objectManager = $bootstrap->getObjectManager(); |
|
| 25 | + $objectManager = $bootstrap->getObjectManager(); |
|
| 26 | 26 | |
| 27 | 27 | $objectManager->get($class); |
| 28 | 28 | $_git_hook_loaded_class[$class] = true; |
| 29 | - } catch(\Exception $e) { |
|
| 29 | + } catch (\Exception $e) { |
|
| 30 | 30 | $_git_hook_loaded_class[$class] = false; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | /* Find bootstrap path */ |
| 4 | 4 | $rootPath = realpath(dirname(__FILE__)); |
| 5 | -while (!file_exists($rootPath . '/app/bootstrap.php') || $rootPath == '/') { |
|
| 5 | +while (!file_exists($rootPath.'/app/bootstrap.php') || $rootPath == '/') { |
|
| 6 | 6 | $rootPath = realpath(dirname($rootPath)); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | /* Include Magento bootstrap file */ |
| 10 | -require_once $rootPath . '/app/bootstrap.php'; |
|
| 10 | +require_once $rootPath.'/app/bootstrap.php'; |
|
| 11 | 11 | |
| 12 | 12 | /* Create git hook class autoloader */ |
| 13 | 13 | $_git_hook_loaded_class = []; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $errors['Ignored Files:'] = $this->ignoredFiles; |
| 41 | 41 | } |
| 42 | 42 | echo "\nErrors found:\n" |
| 43 | - .\var_export($errors, true); |
|
| 43 | + .\var_export($errors, true); |
|
| 44 | 44 | throw new \RuntimeException( |
| 45 | 45 | 'Errors validating PSR4' |
| 46 | 46 | ); |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | $realAbsPathRoot = \realpath($absPathRoot); |
| 160 | 160 | if (false === $realAbsPathRoot) { |
| 161 | 161 | $invalidPathMessage = "Namespace root '$namespaceRoot'". |
| 162 | - "\ncontains a path '$path''". |
|
| 163 | - "\nwhich doesn't exist\n"; |
|
| 162 | + "\ncontains a path '$path''". |
|
| 163 | + "\nwhich doesn't exist\n"; |
|
| 164 | 164 | if (strpos($absPathRoot, "Magento") !== false) { |
| 165 | 165 | $invalidPathMessage .= 'Magento\'s composer includes this by default, ' |
| 166 | - .'it should be removed from the psr-4 section'; |
|
| 166 | + .'it should be removed from the psr-4 section'; |
|
| 167 | 167 | } |
| 168 | 168 | throw new \RuntimeException($invalidPathMessage); |
| 169 | 169 | } |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $realPath, |
| 114 | 114 | \RecursiveDirectoryIterator::SKIP_DOTS |
| 115 | 115 | ); |
| 116 | - $iterator = new \RecursiveIteratorIterator( |
|
| 116 | + $iterator = new \RecursiveIteratorIterator( |
|
| 117 | 117 | $directoryIterator, |
| 118 | 118 | \RecursiveIteratorIterator::SELF_FIRST |
| 119 | 119 | ); |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | '', |
| 118 | 118 | dirname($file) |
| 119 | 119 | ); |
| 120 | - $start .= '/'.rtrim($relativeSubdirs, '/'); |
|
| 120 | + $start .= '/'.rtrim($relativeSubdirs, '/'); |
|
| 121 | 121 | } |
| 122 | 122 | $realpath = realpath($start.'/'.$path); |
| 123 | 123 | if (empty($realpath) || (!file_exists($realpath) && !is_dir($realpath))) { |