@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | if (!defined('HIDEV_VENDOR_DIR')) { |
| 13 | - foreach ([dirname(dirname(__DIR__)) . '/vendor', dirname(dirname(dirname(dirname(__DIR__))))] as $dir) { |
|
| 14 | - if (file_exists($dir . '/autoload.php')) { |
|
| 13 | + foreach ([dirname(dirname(__DIR__)).'/vendor', dirname(dirname(dirname(dirname(__DIR__))))] as $dir) { |
|
| 14 | + if (file_exists($dir.'/autoload.php')) { |
|
| 15 | 15 | define('HIDEV_VENDOR_DIR', $dir); |
| 16 | 16 | break; |
| 17 | 17 | } |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | exit(1); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - require HIDEV_VENDOR_DIR . '/autoload.php'; |
|
| 26 | - require HIDEV_VENDOR_DIR . '/yiisoft/yii2/Yii.php'; |
|
| 25 | + require HIDEV_VENDOR_DIR.'/autoload.php'; |
|
| 26 | + require HIDEV_VENDOR_DIR.'/yiisoft/yii2/Yii.php'; |
|
| 27 | 27 | |
| 28 | 28 | Yii::setAlias('@hidev', dirname(__DIR__)); |
| 29 | 29 | } |
@@ -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 | |