@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | /** |
| 121 | 121 | * Checks if repo exists. |
| 122 | 122 | * @param string $repo full name vendor/package defaults to this repo name |
| 123 | - * @return int exit code |
|
| 123 | + * @return boolean exit code |
|
| 124 | 124 | */ |
| 125 | 125 | public function actionExists($repo = null) |
| 126 | 126 | { |
@@ -168,6 +168,10 @@ discard block |
||
| 168 | 168 | return 0; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $method |
|
| 173 | + * @param string $path |
|
| 174 | + */ |
|
| 171 | 175 | public function request($method, $path, $data) |
| 172 | 176 | { |
| 173 | 177 | $url = 'https://api.github.com' . $path; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | define('HIDEV_VENDOR_DIR', dirname(dirname(dirname(dirname(__DIR__))))); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | -$runtimePath = (substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR)) . '/.hidev/runtime'; |
|
| 15 | +$runtimePath = (substr(__DIR__, 0, 7) === 'phar://' ? dirname($_SERVER['SCRIPT_NAME']) : dirname(HIDEV_VENDOR_DIR)).'/.hidev/runtime'; |
|
| 16 | 16 | |
| 17 | 17 | return [ |
| 18 | 18 | 'id' => 'hidev', |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ], |
| 88 | 88 | 'own.version' => [ |
| 89 | 89 | 'class' => \hidev\components\Version::class, |
| 90 | - 'file' => dirname(dirname(__DIR__)) . '/version', |
|
| 90 | + 'file' => dirname(dirname(__DIR__)).'/version', |
|
| 91 | 91 | ], |
| 92 | 92 | ], |
| 93 | 93 | 'controllerMap' => [ |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ], |
| 108 | 108 | 'container' => [ |
| 109 | 109 | 'singletons' => [ |
| 110 | - \hidev\components\AbstractVcs::class => function () { |
|
| 110 | + \hidev\components\AbstractVcs::class => function() { |
|
| 111 | 111 | $detectedVCS = 'git'; /// TODO actual detection to be added |
| 112 | 112 | return Yii::$app->get($detectedVCS); |
| 113 | 113 | }, |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $type = isset($config['template']) || isset($config['copy']) ? 'File' : 'Directory'; |
| 29 | 29 | $defaults = [ |
| 30 | 30 | 'class' => "hidev\\components\\$type", |
| 31 | - 'path' => $this->path . '/' . $id, |
|
| 31 | + 'path' => $this->path.'/'.$id, |
|
| 32 | 32 | ]; |
| 33 | 33 | $config = array_merge($defaults, $config ?: []); |
| 34 | 34 | $object = Yii::createObject($config); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | foreach ($this->getCommands() as $command) { |
| 46 | 46 | $command = trim($command); |
| 47 | 47 | if ($command) { |
| 48 | - passthru(($this->sudo ? 'sudo ' : '') . $command); |
|
| 48 | + passthru(($this->sudo ? 'sudo ' : '').$command); |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | $this->after(); |