@@ -39,7 +39,7 @@ |
||
| 39 | 39 | if ($style) { |
| 40 | 40 | $message = Console::ansiFormat($message, $style); |
| 41 | 41 | } |
| 42 | - Console::stdout($message . "\n"); |
|
| 42 | + Console::stdout($message."\n"); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function getLevel() |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | { |
| 20 | 20 | public static function exec($route, array $args, $wait = false) |
| 21 | 21 | { |
| 22 | - $path = dirname(__DIR__) . '/bin/hidev'; |
|
| 22 | + $path = dirname(__DIR__).'/bin/hidev'; |
|
| 23 | 23 | $command = "$path $route"; |
| 24 | 24 | foreach ($args as $arg) { |
| 25 | - $command .= ' ' . escapeshellarg($arg); |
|
| 25 | + $command .= ' '.escapeshellarg($arg); |
|
| 26 | 26 | } |
| 27 | 27 | $amp = $wait ? '' : '&'; |
| 28 | 28 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | if ($this->exportContext[$level] ?? false) { |
| 48 | 48 | $export = VarDumper::export($context); |
| 49 | - Console::stdout($export . "\n"); |
|
| 49 | + Console::stdout($export."\n"); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } else { |
| 63 | 63 | return; |
| 64 | 64 | } |
| 65 | - Console::stdout($message . "\n"); |
|
| 65 | + Console::stdout($message."\n"); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | protected function getContextMessage() |
@@ -48,16 +48,16 @@ |
||
| 48 | 48 | { |
| 49 | 49 | $path = parent::detectCommand($path); |
| 50 | 50 | |
| 51 | - return is_executable($path) ? $path : '/usr/bin/env python ' . $path; |
|
| 51 | + return is_executable($path) ? $path : '/usr/bin/env python '.$path; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function install() |
| 55 | 55 | { |
| 56 | 56 | if ($this->installer) { |
| 57 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->installer) . ' -O- | /usr/bin/env python', $exitcode); |
|
| 57 | + passthru('/usr/bin/env wget '.escapeshellarg($this->installer).' -O- | /usr/bin/env python', $exitcode); |
|
| 58 | 58 | } elseif ($this->download) { |
| 59 | - $dest = Yii::getAlias('@root/' . $this->name, false); |
|
| 60 | - passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode); |
|
| 59 | + $dest = Yii::getAlias('@root/'.$this->name, false); |
|
| 60 | + passthru('/usr/bin/env wget '.escapeshellarg($this->download).' -O '.$dest, $exitcode); |
|
| 61 | 61 | } else { |
| 62 | 62 | $args = ['pip', 'install']; |
| 63 | 63 | if (!$_SERVER['VIRTUAL_ENV']) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | public function getFull_name() |
| 37 | 37 | { |
| 38 | - return $this->getVendor() . '/' . $this->getName(); |
|
| 38 | + return $this->getVendor().'/'.$this->getName(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function setFullName($value) |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | public function createRepo(string $repo = null) |
| 112 | 112 | { |
| 113 | 113 | $end = $this->getVendorType() === 'org' |
| 114 | - ?'/orgs/' . $this->getVendor() . '/repos' |
|
| 114 | + ? '/orgs/'.$this->getVendor().'/repos' |
|
| 115 | 115 | : '/user/repos' |
| 116 | 116 | ; |
| 117 | 117 | $res = $this->request('POST', $end, [ |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function cloneRepo($repo) |
| 136 | 136 | { |
| 137 | - return $this->passthru('git', ['clone', '[email protected]:' . $repo]); |
|
| 137 | + return $this->passthru('git', ['clone', '[email protected]:'.$repo]); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public static function exists($repo) |
| 156 | 156 | { |
| 157 | - return !static::exec('git', ['ls-remote', '[email protected]:' . $repo], true); |
|
| 157 | + return !static::exec('git', ['ls-remote', '[email protected]:'.$repo], true); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | return $wait; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - return $this->request('POST', '/repos/' . $this->getFull_name() . '/releases', [ |
|
| 173 | + return $this->request('POST', '/repos/'.$this->getFull_name().'/releases', [ |
|
| 174 | 174 | 'tag_name' => $release, |
| 175 | 175 | 'name' => $release, |
| 176 | 176 | 'body' => $notes, |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | public function request($method, $path, $data) |
| 193 | 193 | { |
| 194 | - $url = 'https://api.github.com' . $path; |
|
| 194 | + $url = 'https://api.github.com'.$path; |
|
| 195 | 195 | |
| 196 | - return $this->passthru('curl', ['-X', $method, '-H', 'Authorization: token ' . $this->getToken(), '--data', Json::encode($data), $url]); |
|
| 196 | + return $this->passthru('curl', ['-X', $method, '-H', 'Authorization: token '.$this->getToken(), '--data', Json::encode($data), $url]); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | public function findToken() |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | FileHelper::mkdir($this->_path); |
| 24 | 24 | |
| 25 | - foreach ($this->getItems() as $id => $config) { |
|
| 25 | + foreach ($this->getItems() as $id => $config) { |
|
| 26 | 26 | $type = 'Directory'; |
| 27 | 27 | if (isset($config['template']) || isset($config['copy'])) { |
| 28 | 28 | $type = 'File'; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | } |
| 32 | 32 | $defaults = [ |
| 33 | 33 | 'class' => "hidev\\components\\$type", |
| 34 | - 'path' => $this->_path . '/' . $id, |
|
| 34 | + 'path' => $this->_path.'/'.$id, |
|
| 35 | 35 | ]; |
| 36 | 36 | $config = array_merge($defaults, $config ?: []); |
| 37 | 37 | $object = Yii::createObject($config); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $level = $die ? Logger::LEVEL_ERROR : Logger::LEVEL_WARNING; |
| 35 | - Yii::getLogger()->log('Failed to read file: ' . $path, $level, 'file'); |
|
| 35 | + Yii::getLogger()->log('Failed to read file: '.$path, $level, 'file'); |
|
| 36 | 36 | |
| 37 | 37 | return false; |
| 38 | 38 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | unlink($tmp); |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | - Yii::warning('Written file: ' . $path, 'file'); |
|
| 67 | + Yii::warning('Written file: '.$path, 'file'); |
|
| 68 | 68 | |
| 69 | 69 | return true; |
| 70 | 70 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $path = rtrim(trim($path), '/'); |
| 82 | 82 | if (!file_exists($path)) { |
| 83 | 83 | mkdir($path, 0777, true); |
| 84 | - Yii::warning('Created dir: ' . $path . '/', 'file'); |
|
| 84 | + Yii::warning('Created dir: '.$path.'/', 'file'); |
|
| 85 | 85 | |
| 86 | 86 | return true; |
| 87 | 87 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public static function symlink($src, $dst) |
| 99 | 99 | { |
| 100 | 100 | try { |
| 101 | - if(is_link($dst)) { |
|
| 101 | + if (is_link($dst)) { |
|
| 102 | 102 | unlink($dst); |
| 103 | 103 | } |
| 104 | 104 | |