@@ -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 | } |
@@ -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 | } |