@@ -14,7 +14,7 @@ |
||
14 | 14 | $this->interpolate($item); |
15 | 15 | } |
16 | 16 | } elseif (is_string($data)) { |
17 | - $data = preg_replace_callback('/\\$(\\w+)\\[\'(.+?)\'\\]/', function ($matches) { |
|
17 | + $data = preg_replace_callback('/\\$(\\w+)\\[\'(.+?)\'\\]/', function($matches) { |
|
18 | 18 | return $this->get($matches[1], $matches[2]); |
19 | 19 | }, $data); |
20 | 20 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | if ($style) { |
38 | 38 | $message = Console::ansiFormat($message, $style); |
39 | 39 | } |
40 | - Console::stdout($message . "\n"); |
|
40 | + Console::stdout($message."\n"); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | protected function getContextMessage() |
@@ -8,24 +8,24 @@ |
||
8 | 8 | * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/) |
9 | 9 | */ |
10 | 10 | |
11 | -require_once __DIR__ . '/defines.php'; |
|
11 | +require_once __DIR__.'/defines.php'; |
|
12 | 12 | |
13 | 13 | if (!defined('HIDEV_VENDOR_DIR')) { |
14 | - foreach ([dirname(dirname(__DIR__)) . '/vendor', dirname(dirname(dirname(dirname(__DIR__))))] as $dir) { |
|
15 | - if (file_exists($dir . '/autoload.php')) { |
|
14 | + foreach ([dirname(dirname(__DIR__)).'/vendor', dirname(dirname(dirname(dirname(__DIR__))))] as $dir) { |
|
15 | + if (file_exists($dir.'/autoload.php')) { |
|
16 | 16 | define('HIDEV_VENDOR_DIR', $dir); |
17 | 17 | break; |
18 | 18 | } |
19 | 19 | } |
20 | 20 | } |
21 | 21 | |
22 | -if (!defined('HIDEV_VENDOR_DIR') || !file_exists(HIDEV_VENDOR_DIR . '/autoload.php')) { |
|
22 | +if (!defined('HIDEV_VENDOR_DIR') || !file_exists(HIDEV_VENDOR_DIR.'/autoload.php')) { |
|
23 | 23 | fwrite(STDERR, "Run composer to set up dependencies!\n"); |
24 | 24 | exit(1); |
25 | 25 | } |
26 | 26 | |
27 | -require_once HIDEV_VENDOR_DIR . '/autoload.php'; |
|
28 | -require_once HIDEV_VENDOR_DIR . '/yiisoft/yii2/Yii.php'; |
|
27 | +require_once HIDEV_VENDOR_DIR.'/autoload.php'; |
|
28 | +require_once HIDEV_VENDOR_DIR.'/yiisoft/yii2/Yii.php'; |
|
29 | 29 | |
30 | 30 | Yii::setAlias('@hidev', dirname(__DIR__)); |
31 | 31 | Yii::setAlias('@vendor', HIDEV_VENDOR_DIR); |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | Yii::setAlias('@root', $this->getRootDir()); |
88 | 88 | $config = $this->takeConfig()->rawItem('package'); |
89 | 89 | $alias = isset($config['namespace']) ? strtr($config['namespace'], '\\', '/') : ''; |
90 | - if ($alias && !Yii::getAlias('@' . $alias, false)) { |
|
91 | - $srcdir = Yii::getAlias('@root/' . ($config['src'] ?: 'src')); |
|
90 | + if ($alias && !Yii::getAlias('@'.$alias, false)) { |
|
91 | + $srcdir = Yii::getAlias('@root/'.($config['src'] ?: 'src')); |
|
92 | 92 | Yii::setAlias($alias, $srcdir); |
93 | 93 | } |
94 | 94 | $aliases = $this->takeConfig()->rawItem('aliases'); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | if ($file->save($data) || !is_dir('.hidev/vendor')) { |
122 | 122 | $this->runAction('update'); |
123 | 123 | } |
124 | - $vendors[] = $this->getRootDir() . '/.hidev/vendor'; |
|
124 | + $vendors[] = $this->getRootDir().'/.hidev/vendor'; |
|
125 | 125 | } elseif ($this->needsComposerInstall()) { |
126 | 126 | if ($this->passthru('composer', ['install', '--ansi'])) { |
127 | 127 | throw new InvalidParamException('Failed initialize project with composer install'); |
128 | 128 | } |
129 | 129 | } |
130 | - $localVendor = $this->getRootDir() . '/vendor'; |
|
130 | + $localVendor = $this->getRootDir().'/vendor'; |
|
131 | 131 | if (file_exists(ConfigPlugin::path($localVendor, 'hidev'))) { |
132 | 132 | $vendors[] = $localVendor; |
133 | 133 | } |
@@ -222,6 +222,6 @@ discard block |
||
222 | 222 | |
223 | 223 | public function buildRootPath($subpath) |
224 | 224 | { |
225 | - return $this->getRootDir() . DIRECTORY_SEPARATOR . $subpath; |
|
225 | + return $this->getRootDir().DIRECTORY_SEPARATOR.$subpath; |
|
226 | 226 | } |
227 | 227 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | foreach (['params', 'aliases', 'modules', 'components', 'container'] as $key) { |
84 | 84 | if (isset($config[$key])) { |
85 | - $this->{'setExtra' . ucfirst($key)}($config[$key]); |
|
85 | + $this->{'setExtra'.ucfirst($key)}($config[$key]); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |