@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Kunstmaan\Skylab\Command; |
| 3 | 3 | |
| 4 | 4 | use CL\Slack\Model\Attachment; |
| 5 | -use CL\Slack\Model\AttachmentField; |
|
| 6 | 5 | use CL\Slack\Payload\ChatDeletePayload; |
| 7 | 6 | use CL\Slack\Payload\ChatPostMessagePayload; |
| 8 | 7 | use CL\Slack\Payload\ChatPostMessagePayloadResponse; |
@@ -47,6 +47,10 @@ discard block |
||
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $step |
|
| 52 | + * @param string $successStep |
|
| 53 | + */ |
|
| 50 | 54 | protected function runStep($step, $yaml, $deployEnv, $successStep = null) |
| 51 | 55 | { |
| 52 | 56 | if (isset($yaml[$step])) { |
@@ -86,6 +90,10 @@ discard block |
||
| 86 | 90 | } |
| 87 | 91 | } |
| 88 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $message |
|
| 95 | + * @param string $user |
|
| 96 | + */ |
|
| 89 | 97 | protected function notifySlack($message, $project, $env, $user, $resolverArray, $color = "#FFCC00", $update = false) |
| 90 | 98 | { |
| 91 | 99 | if ($update) { |
@@ -328,6 +336,9 @@ discard block |
||
| 328 | 336 | return $mergedYaml; |
| 329 | 337 | } |
| 330 | 338 | |
| 339 | + /** |
|
| 340 | + * @param string $prefix |
|
| 341 | + */ |
|
| 331 | 342 | protected function collectDeploySettings($deploySettings, $prefix, $resolverArray) |
| 332 | 343 | { |
| 333 | 344 | $resolverArray[$prefix . "_server"] = $deploySettings["server"]; |
@@ -352,7 +363,7 @@ discard block |
||
| 352 | 363 | } |
| 353 | 364 | |
| 354 | 365 | /** |
| 355 | - * @return mixed |
|
| 366 | + * @return string|false |
|
| 356 | 367 | */ |
| 357 | 368 | protected function getRevision() |
| 358 | 369 | { |
@@ -360,7 +371,7 @@ discard block |
||
| 360 | 371 | } |
| 361 | 372 | |
| 362 | 373 | /** |
| 363 | - * @return mixed |
|
| 374 | + * @return string|false |
|
| 364 | 375 | */ |
| 365 | 376 | protected function getBranch() |
| 366 | 377 | { |
@@ -152,6 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | + * @param string $skeletonName |
|
| 155 | 156 | * @return string |
| 156 | 157 | */ |
| 157 | 158 | public function getConfigTemplateDir($skeletonName, $clean = false) |
@@ -160,6 +161,7 @@ discard block |
||
| 160 | 161 | } |
| 161 | 162 | |
| 162 | 163 | /** |
| 164 | + * @param string $skeletonName |
|
| 163 | 165 | * @return string |
| 164 | 166 | */ |
| 165 | 167 | public function getCustomConfigTemplateDir($skeletonName, $clean = false) |
@@ -259,7 +261,6 @@ discard block |
||
| 259 | 261 | /** |
| 260 | 262 | * @param string $sourcePath |
| 261 | 263 | * @param string $destinationPath |
| 262 | - * @param string[] $variables |
|
| 263 | 264 | */ |
| 264 | 265 | public function renderDist($sourcePath, $destinationPath) |
| 265 | 266 | { |
@@ -269,7 +270,7 @@ discard block |
||
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | /** |
| 272 | - * @param $content |
|
| 273 | + * @param string $content |
|
| 273 | 274 | * @param $variables |
| 274 | 275 | * @return string |
| 275 | 276 | */ |
@@ -305,9 +306,9 @@ discard block |
||
| 305 | 306 | } |
| 306 | 307 | |
| 307 | 308 | /** |
| 308 | - * @param $location |
|
| 309 | - * @param $cleanedLocation |
|
| 310 | - * @param $target |
|
| 309 | + * @param string $location |
|
| 310 | + * @param string $cleanedLocation |
|
| 311 | + * @param string $target |
|
| 311 | 312 | */ |
| 312 | 313 | public function renderConfig($location, $cleanedLocation, $target) |
| 313 | 314 | { |
@@ -320,9 +321,9 @@ discard block |
||
| 320 | 321 | } |
| 321 | 322 | |
| 322 | 323 | /** |
| 323 | - * @param $location |
|
| 324 | - * @param $cleanedLocation |
|
| 325 | - * @param $target |
|
| 324 | + * @param string $location |
|
| 325 | + * @param string $cleanedLocation |
|
| 326 | + * @param string $target |
|
| 326 | 327 | */ |
| 327 | 328 | public function renderDistConfig($location, $cleanedLocation, $target) |
| 328 | 329 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Cilex\Application; |
| 6 | 6 | use Symfony\Component\Process\Process; |
| 7 | -use Symfony\Component\Process\ProcessBuilder; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * ProcessProvider |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param bool $silent Be silent or not |
| 28 | 28 | * |
| 29 | 29 | * @param \Closure $callback |
| 30 | - * @return bool|string |
|
| 30 | + * @return string|false |
|
| 31 | 31 | */ |
| 32 | 32 | public function executeCommand($command, $silent = false, \Closure $callback = null, $env=array()) |
| 33 | 33 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @param bool $silent Be silent or not |
| 40 | 40 | * @param string $sudoAs Sudo as a different user then the root user |
| 41 | 41 | * |
| 42 | - * @return bool|string |
|
| 42 | + * @return string|false |
|
| 43 | 43 | */ |
| 44 | 44 | public function executeSudoCommand($command, $silent = false, $sudoAs = null, \Closure $callback = null, $env=array()) |
| 45 | 45 | { |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * @param $command |
|
| 64 | + * @param string $command |
|
| 65 | 65 | * @param $silent |
| 66 | 66 | * @param \Closure $callback |
| 67 | 67 | * @param $env |
| 68 | - * @return bool|string |
|
| 68 | + * @return string|false |
|
| 69 | 69 | * @throws \Kunstmaan\Skylab\Exceptions\SkylabException |
| 70 | 70 | */ |
| 71 | 71 | private function performCommand($command, $silent=false, \Closure $callback = null, $env=array()) |
@@ -114,6 +114,9 @@ |
||
| 114 | 114 | return $data; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | + /** |
|
| 118 | + * @param string $url |
|
| 119 | + */ |
|
| 117 | 120 | private function performAPICall($url, $data = array()) |
| 118 | 121 | { |
| 119 | 122 | |
@@ -81,12 +81,18 @@ discard block |
||
| 81 | 81 | $this->performAPICall("Tests/Update", "PUT", $data); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | + /** |
|
| 85 | + * @param boolean $id |
|
| 86 | + */ |
|
| 84 | 87 | private function updateTest($id, \ArrayObject $project) |
| 85 | 88 | { |
| 86 | 89 | $data = $this->getTestArray($project, $id); |
| 87 | 90 | $this->performAPICall("Tests/Update", "PUT", $data); |
| 88 | 91 | } |
| 89 | 92 | |
| 93 | + /** |
|
| 94 | + * @param boolean $id |
|
| 95 | + */ |
|
| 90 | 96 | private function deleteTest($id) |
| 91 | 97 | { |
| 92 | 98 | $data = $this->getTestArray(null, $id); |
@@ -118,6 +124,10 @@ discard block |
||
| 118 | 124 | return $data; |
| 119 | 125 | } |
| 120 | 126 | |
| 127 | + /** |
|
| 128 | + * @param string $url |
|
| 129 | + * @param string $method |
|
| 130 | + */ |
|
| 121 | 131 | private function performAPICall($url, $method, $data = null) |
| 122 | 132 | { |
| 123 | 133 | |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Kunstmaan\Skylab\Skeleton; |
| 3 | 3 | |
| 4 | -use Kunstmaan\Skylab\Exceptions\SkylabException; |
|
| 5 | 4 | use Symfony\Component\Finder\Finder; |
| 6 | 5 | use Symfony\Component\Finder\SplFileInfo; |
| 7 | 6 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * @param string $groupName The group name |
| 44 | 44 | * |
| 45 | - * @return bool|string |
|
| 45 | + * @return string|false |
|
| 46 | 46 | */ |
| 47 | 47 | private function isGroup($groupName) |
| 48 | 48 | { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * @param string $userName The user name |
| 85 | 85 | * |
| 86 | - * @return mixed |
|
| 86 | + * @return string|false |
|
| 87 | 87 | */ |
| 88 | 88 | private function isUser($userName) |
| 89 | 89 | { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * @param string $question The question text |
| 95 | 95 | * @param bool $default The default action |
| 96 | - * @return bool |
|
| 96 | + * @return string |
|
| 97 | 97 | */ |
| 98 | 98 | public function askConfirmation($question, $default = true) |
| 99 | 99 | { |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | - * @param string $message |
|
| 139 | + * @param double $startTime |
|
| 140 | 140 | */ |
| 141 | 141 | public function logCommandTime($startTime) |
| 142 | 142 | { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | /** |
| 224 | 224 | * @param $message |
| 225 | - * @param bool|true $report |
|
| 225 | + * @param boolean $report |
|
| 226 | 226 | * @throws SkylabException |
| 227 | 227 | */ |
| 228 | 228 | public function logError($message, $report=true) |
@@ -268,6 +268,7 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | /** |
| 270 | 270 | * @param $rows |
| 271 | + * @param string[] $headers |
|
| 271 | 272 | */ |
| 272 | 273 | public function renderTable($headers, $rows) |
| 273 | 274 | { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @param $url |
|
| 23 | + * @param string $url |
|
| 24 | 24 | * @param string $contentType |
| 25 | 25 | * @param string $filename |
| 26 | 26 | * @return string |