@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | private function compile(AbstractModule $module, AbstractAppMeta $appMeta, $scriptDir) |
| 81 | 81 | { |
| 82 | - $hashFile = $appMeta->tmpDir . '/compile_hash'; |
|
| 82 | + $hashFile = $appMeta->tmpDir.'/compile_hash'; |
|
| 83 | 83 | $moduleHash = md5(serialize($module)); |
| 84 | 84 | $isUnchanged = file_exists($hashFile) && (file_get_contents($hashFile) === $moduleHash); |
| 85 | 85 | if ($isUnchanged) { |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | $contextsArray = array_reverse(explode('-', $contexts)); |
| 105 | 105 | $module = null; |
| 106 | 106 | foreach ($contextsArray as $context) { |
| 107 | - $class = $appMeta->name . '\Module\\' . ucwords($context) . 'Module'; |
|
| 108 | - if (! class_exists($class)) { |
|
| 109 | - $class = 'BEAR\Package\Context\\' . ucwords($context) . 'Module'; |
|
| 107 | + $class = $appMeta->name.'\Module\\'.ucwords($context).'Module'; |
|
| 108 | + if (!class_exists($class)) { |
|
| 109 | + $class = 'BEAR\Package\Context\\'.ucwords($context).'Module'; |
|
| 110 | 110 | } |
| 111 | - if (! is_a($class, AbstractModule::class, true)) { |
|
| 111 | + if (!is_a($class, AbstractModule::class, true)) { |
|
| 112 | 112 | throw new InvalidContextException($class); |
| 113 | 113 | } |
| 114 | 114 | /* @var $module AbstractModule */ |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | private function cleanupDir($tmpDir) |
| 125 | 125 | { |
| 126 | - $unlink = function ($path) use (&$unlink) { |
|
| 127 | - foreach (glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*') as $file) { |
|
| 126 | + $unlink = function($path) use (&$unlink) { |
|
| 127 | + foreach (glob(rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'*') as $file) { |
|
| 128 | 128 | is_dir($file) ? $unlink($file) : unlink($file); |
| 129 | 129 | @rmdir($file); |
| 130 | 130 | } |