@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function prepareCommand($args) |
64 | 64 | { |
65 | - return $this->getCommand() . $this->prepareArguments($args); |
|
65 | + return $this->getCommand().$this->prepareArguments($args); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | public function install() |
69 | 69 | { |
70 | - throw new InvalidConfigException('Don\'t know how to install ' . $this->name); |
|
70 | + throw new InvalidConfigException('Don\'t know how to install '.$this->name); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function detectPath($name) |
101 | 101 | { |
102 | - return exec('which ' . $name) ?: null; |
|
102 | + return exec('which '.$name) ?: null; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $path = $this->getPath(); |
135 | 135 | } |
136 | 136 | if (!$path || !file_exists($path)) { |
137 | - throw new InvalidConfigException('Failed to find how to run ' . $this->name); |
|
137 | + throw new InvalidConfigException('Failed to find how to run '.$this->name); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return $path; |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | public function prepareArguments($args) |
149 | 149 | { |
150 | 150 | if (is_string($args)) { |
151 | - $res = ' ' . trim($args); |
|
151 | + $res = ' '.trim($args); |
|
152 | 152 | } else { |
153 | 153 | $res = ''; |
154 | 154 | foreach ($args as $a) { |
155 | - $res .= ' ' . escapeshellarg($a); |
|
155 | + $res .= ' '.escapeshellarg($a); |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if (!defined('HIDEV_VENDOR_DIR')) { |
13 | - foreach ([dirname(__DIR__) . '/vendor', dirname(dirname(dirname(__DIR__)))] as $dir) { |
|
14 | - if (file_exists($dir . '/autoload.php')) { |
|
13 | + foreach ([dirname(__DIR__).'/vendor', 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,6 +22,6 @@ 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 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | public function actionSave() |
29 | 29 | { |
30 | - passthru(($this->sudo ? 'sudo ' : '') . $this->command); |
|
30 | + passthru(($this->sudo ? 'sudo ' : '').$this->command); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | public function actionBefore() |
@@ -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', |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function renderPath($path, $data) |
25 | 25 | { |
26 | 26 | copy($data->getCopy(), $path); |
27 | - Yii::warning('Copied file: ' . $path); |
|
27 | + Yii::warning('Copied file: '.$path); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | Yii::setAlias('@root', $this->getRootDir()); |
78 | 78 | $config = $this->takeConfig()->rawItem('package'); |
79 | 79 | $alias = strtr($config['namespace'], '\\', '/'); |
80 | - if ($alias && !Yii::getAlias('@' . $alias, false)) { |
|
81 | - $srcdir = Yii::getAlias('@root/' . ($config['src'] ?: 'src')); |
|
80 | + if ($alias && !Yii::getAlias('@'.$alias, false)) { |
|
81 | + $srcdir = Yii::getAlias('@root/'.($config['src'] ?: 'src')); |
|
82 | 82 | Yii::setAlias($alias, $srcdir); |
83 | 83 | } |
84 | 84 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | protected function findRootDir() |
189 | 189 | { |
190 | 190 | $configDir = '.hidev'; |
191 | - for ($i = 0;$i < 9;++$i) { |
|
191 | + for ($i = 0; $i < 9; ++$i) { |
|
192 | 192 | if (is_dir($configDir)) { |
193 | 193 | return getcwd(); |
194 | 194 | } |
@@ -66,16 +66,16 @@ |
||
66 | 66 | { |
67 | 67 | $path = parent::detectCommand($path); |
68 | 68 | |
69 | - return is_executable($path) ? $path : '/usr/bin/env php ' . $path; |
|
69 | + return is_executable($path) ? $path : '/usr/bin/env php '.$path; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function install() |
73 | 73 | { |
74 | 74 | if ($this->installer) { |
75 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->installer) . ' -O- | /usr/bin/env php', $exitcode); |
|
75 | + passthru('/usr/bin/env wget '.escapeshellarg($this->installer).' -O- | /usr/bin/env php', $exitcode); |
|
76 | 76 | } elseif ($this->download) { |
77 | - $dest = Yii::getAlias('@root/' . $this->name . '.phar', false); |
|
78 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode); |
|
77 | + $dest = Yii::getAlias('@root/'.$this->name.'.phar', false); |
|
78 | + passthru('/usr/bin/env wget '.escapeshellarg($this->download).' -O '.$dest, $exitcode); |
|
79 | 79 | } else { |
80 | 80 | return parent::install(); |
81 | 81 | } |