@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | Yii::setAlias('@root', $this->getRootDir()); |
| 79 | 79 | $config = $this->takeConfig()->rawItem('package'); |
| 80 | 80 | $alias = strtr($config['namespace'], '\\', '/'); |
| 81 | - if ($alias && !Yii::getAlias('@' . $alias, false)) { |
|
| 82 | - $srcdir = Yii::getAlias('@root/' . ($config['src'] ?: 'src')); |
|
| 81 | + if ($alias && !Yii::getAlias('@'.$alias, false)) { |
|
| 82 | + $srcdir = Yii::getAlias('@root/'.($config['src'] ?: 'src')); |
|
| 83 | 83 | Yii::setAlias($alias, $srcdir); |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | protected function findRootDir() |
| 190 | 190 | { |
| 191 | 191 | $configDir = '.hidev'; |
| 192 | - for ($i = 0;$i < 9;++$i) { |
|
| 192 | + for ($i = 0; $i < 9; ++$i) { |
|
| 193 | 193 | if (is_dir($configDir)) { |
| 194 | 194 | return getcwd(); |
| 195 | 195 | } |
@@ -200,6 +200,6 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | public function buildRootPath($subpath) |
| 202 | 202 | { |
| 203 | - return $this->getRootDir() . DIRECTORY_SEPARATOR . $subpath; |
|
| 203 | + return $this->getRootDir().DIRECTORY_SEPARATOR.$subpath; |
|
| 204 | 204 | } |
| 205 | 205 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | 'name' => 'HiDev', |
| 15 | 15 | 'basePath' => dirname(__DIR__), |
| 16 | 16 | 'vendorPath' => HIDEV_VENDOR_DIR, |
| 17 | - 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR) . '/runtime', |
|
| 17 | + 'runtimePath' => substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR).'/runtime', |
|
| 18 | 18 | 'enableCoreCommands' => false, |
| 19 | 19 | 'controllerNamespace' => 'hidev\\controllers', |
| 20 | 20 | 'defaultRoute' => 'default', |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | public static function readExtraVendor($dir) |
| 72 | 72 | { |
| 73 | - return static::readExtraConfig($dir . '/hiqdev/config/hidev.php'); |
|
| 73 | + return static::readExtraConfig($dir.'/hiqdev/config/hidev.php'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public static function readExtraConfig($path) |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | foreach (['params', 'aliases', 'modules', 'components'] as $key) { |
| 107 | 107 | if (isset($config[$key])) { |
| 108 | - $this->{'setExtra' . ucfirst($key)}($config[$key]); |
|
| 108 | + $this->{'setExtra'.ucfirst($key)}($config[$key]); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -146,11 +146,11 @@ |
||
| 146 | 146 | public function read($path, $asArray = false) |
| 147 | 147 | { |
| 148 | 148 | if (file_exists($path)) { |
| 149 | - Yii::info('Read file: ' . $path, 'file'); |
|
| 149 | + Yii::info('Read file: '.$path, 'file'); |
|
| 150 | 150 | |
| 151 | 151 | return $asArray ? file($path) : file_get_contents($path); |
| 152 | 152 | } else { |
| 153 | - Yii::error('Couldn\'t read file: ' . $path, 'file'); |
|
| 153 | + Yii::error('Couldn\'t read file: '.$path, 'file'); |
|
| 154 | 154 | |
| 155 | 155 | return; |
| 156 | 156 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | if (!is_file($path) || file_get_contents($path) !== $content) { |
| 33 | 33 | static::mkdir(dirname($path)); |
| 34 | 34 | file_put_contents($path, $content); |
| 35 | - Yii::warning('Written file: ' . $path, 'file'); |
|
| 35 | + Yii::warning('Written file: '.$path, 'file'); |
|
| 36 | 36 | |
| 37 | 37 | return true; |
| 38 | 38 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $path = rtrim(trim($path), '/'); |
| 53 | 53 | if (!file_exists($path)) { |
| 54 | 54 | mkdir($path, 0777, true); |
| 55 | - Yii::warning('Created dir: ' . $path . '/', 'file'); |
|
| 55 | + Yii::warning('Created dir: '.$path.'/', 'file'); |
|
| 56 | 56 | |
| 57 | 57 | return true; |
| 58 | 58 | } |