@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | { |
66 | 66 | $command = $this->getCommand(); |
67 | 67 | if (is_string($args)) { |
68 | - return $command . ' ' . trim($args); |
|
68 | + return $command.' '.trim($args); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | foreach ($args as $arg) { |
72 | 72 | if ($arg instanceof ModifierInterface) { |
73 | 73 | $command = $arg->modify($command); |
74 | 74 | } else { |
75 | - $command .= ' ' . escapeshellarg($arg); |
|
75 | + $command .= ' '.escapeshellarg($arg); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | public function install() |
83 | 83 | { |
84 | - throw new InvalidConfigException('Don\'t know how to install ' . $this->name); |
|
84 | + throw new InvalidConfigException('Don\'t know how to install '.$this->name); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function detectPath($name) |
115 | 115 | { |
116 | - return exec('which ' . $name) ?: null; |
|
116 | + return exec('which '.$name) ?: null; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $path = $this->getPath(); |
149 | 149 | } |
150 | 150 | if (!$path || !file_exists($path)) { |
151 | - throw new InvalidConfigException('Failed to find how to run ' . $this->name); |
|
151 | + throw new InvalidConfigException('Failed to find how to run '.$this->name); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | return $path; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | foreach ($commands as $command) { |
37 | 37 | $command = trim($command); |
38 | 38 | if ($command) { |
39 | - passthru(($this->sudo ? 'sudo ' : '') . $command); |
|
39 | + passthru(($this->sudo ? 'sudo ' : '').$command); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -15,6 +15,6 @@ |
||
15 | 15 | { |
16 | 16 | public function modify($command) |
17 | 17 | { |
18 | - return 'sudo ' . $command; |
|
18 | + return 'sudo '.$command; |
|
19 | 19 | } |
20 | 20 | } |
@@ -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 | } |
@@ -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', |
@@ -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 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | public function actionSave() |
53 | 53 | { |
54 | - $this->getFile()->write(implode(' ', [$this->version, $this->date, $this->time, $this->zone, $this->hash]) . "\n"); |
|
54 | + $this->getFile()->write(implode(' ', [$this->version, $this->date, $this->time, $this->zone, $this->hash])."\n"); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | public function setVersion($version = null) |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $this->package = $package; |
50 | 50 | } |
51 | 51 | if (!$this->package || !$this->vendor) { |
52 | - throw new InvalidParamException('Wrong vendor/package given: ' . $name); |
|
52 | + throw new InvalidParamException('Wrong vendor/package given: '.$name); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -70,16 +70,16 @@ |
||
70 | 70 | { |
71 | 71 | $path = parent::detectCommand($path); |
72 | 72 | |
73 | - return is_executable($path) ? $path : '/usr/bin/env python ' . $path; |
|
73 | + return is_executable($path) ? $path : '/usr/bin/env python '.$path; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function install() |
77 | 77 | { |
78 | 78 | if ($this->installer) { |
79 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->installer) . ' -O- | /usr/bin/env python', $exitcode); |
|
79 | + passthru('/usr/bin/env wget '.escapeshellarg($this->installer).' -O- | /usr/bin/env python', $exitcode); |
|
80 | 80 | } elseif ($this->download) { |
81 | - $dest = Yii::getAlias('@root/' . $this->name, false); |
|
82 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode); |
|
81 | + $dest = Yii::getAlias('@root/'.$this->name, false); |
|
82 | + passthru('/usr/bin/env wget '.escapeshellarg($this->download).' -O '.$dest, $exitcode); |
|
83 | 83 | } else { |
84 | 84 | passthru("/usr/bin/pip install {$this->package}", $exitcode); |
85 | 85 | } |