GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 8c76e3...58ca15 )
by Christian
04:11
created
src/Task/SubTask.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,6 @@
 block discarded – undo
15 15
 namespace Netresearch\Kite\Task;
16 16
 use Netresearch\Kite\Task;
17 17
 use Netresearch\Kite\Tasks;
18
-use Netresearch\Kite\Workflow;
19
-use Netresearch\Kite\Exception;
20 18
 
21 19
 /**
22 20
  * Run tasks or a workflow within a task
Please login to merge, or discard this patch.
src/Tasks.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
     /**
427 427
      * Execute the next fetched task after given $task
428 428
      *
429
-     * @param Task|string $task Task or task name
429
+     * @param string $task Task or task name
430 430
      *
431 431
      * @return $this
432 432
      */
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
      * @param string $question The question
445 445
      * @param string $default  The default value
446 446
      *
447
-     * @return mixed|\Netresearch\Kite\Task
447
+     * @return string
448 448
      */
449 449
     public function answer($question, $default = null)
450 450
     {
@@ -506,11 +506,11 @@  discard block
 block discarded – undo
506 506
      * Run a composer command
507 507
      *
508 508
      * @param string            $command         The command to execute
509
-     * @param array|string|null $optArg          Options and arguments
509
+     * @param string $optArg          Options and arguments
510 510
      *                                           {@see \Netresearch\Kite\Task\ShellTask}
511 511
      * @param array             $processSettings Settings for symfony process class
512 512
      *
513
-     * @return string|\Netresearch\Kite\Task\ComposerTask
513
+     * @return string
514 514
      */
515 515
     public function composer($command, $optArg = null, array $processSettings = array())
516 516
     {
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      *                                           {@see \Netresearch\Kite\Task\ShellTask}
567 567
      * @param array             $processSettings Settings for symfony process class
568 568
      *
569
-     * @return Task\GitTask|string
569
+     * @return string
570 570
      */
571 571
     public function git($command, $cwd = null, $optArg = null, array $processSettings = array())
572 572
     {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     /**
577 577
      * Run a workflow for each of the $array's values.
578 578
      *
579
-     * @param array|\Traversable $array    The object to iterate over
579
+     * @param string $array    The object to iterate over
580 580
      * @param string|array       $as       Either string for
581 581
      *                                     foreach ($array as $as)
582 582
      *                                     or array for
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
      *                                           {@see \Netresearch\Kite\Task\ShellTask}
634 634
      * @param array             $processSettings Settings for symfony process class
635 635
      *
636
-     * @return Task\RemoteShellTask|string
636
+     * @return string
637 637
      */
638 638
     public function remoteShell($command, $cwd = null, $optArg = null, array $processSettings = array())
639 639
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         if (!$name) {
284 284
             return 0;
285 285
         }
286
-        $key = $type . ':' . $name;
286
+        $key = $type.':'.$name;
287 287
         $tasksAdded = 0;
288 288
         if (array_key_exists($key, $this->job->deferredTasks)) {
289 289
             while ($task = array_shift($this->job->deferredTasks[$key])) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                 $shouldRun = $if;
311 311
             } elseif (is_string($if)) {
312 312
                 $shouldRun = (boolean) $task->expand(
313
-                    '{' . $if . ' ? 1 : 0}'
313
+                    '{'.$if.' ? 1 : 0}'
314 314
                 );
315 315
             } else {
316 316
                 $shouldRun = call_user_func_array($if, array($task, $this->console));
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                     if ($name === '@self') {
350 350
                         $name = $this->get('name');
351 351
                     }
352
-                    $key = $type . ':' . $name;
352
+                    $key = $type.':'.$name;
353 353
                     $this->job->deferredTasks[$key][] = $task;
354 354
                 }
355 355
             }
Please login to merge, or discard this patch.
src/Workflow/Composer/Merge.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 
15 15
 namespace Netresearch\Kite\Workflow\Composer;
16 16
 use Netresearch\Kite\Service\Composer\Package;
17
-use Netresearch\Kite\Task;
18 17
 use Netresearch\Kite\Workflow;
19 18
 
20 19
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function assemble()
78 78
     {
79 79
         $this->callback(
80
-            function () {
80
+            function() {
81 81
                 $mergeBranch = $this->get('branch');
82 82
                 $diagnose = !$this->get('no-diagnose');
83 83
                 $delete = $this->get('delete', false);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
                     if ($delete) {
102 102
                         $this->git('branch', $package->path, array('d' => $mergeBranch));
103
-                        $this->git('push', $package->path, array('origin', ':' . $mergeBranch));
103
+                        $this->git('push', $package->path, array('origin', ':'.$mergeBranch));
104 104
                     }
105 105
                 }
106 106
 
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
                         $package->branches[] = $checkoutBranch;
143 143
                         $inferFromBranch = 'master';
144 144
                     }
145
-                    $this->git('fetch', $package->path, array('force' => true, 'origin', $inferFromBranch . ':' . $checkoutBranch));
145
+                    $this->git('fetch', $package->path, array('force' => true, 'origin', $inferFromBranch.':'.$checkoutBranch));
146 146
                     $this->git('checkout', $package->path, array($checkoutBranch));
147 147
                     $package->branch = $checkoutBranch;
148
-                    $package->version = 'dev-' . $checkoutBranch;
148
+                    $package->version = 'dev-'.$checkoutBranch;
149 149
                 } else {
150 150
                     continue;
151 151
                 }
Please login to merge, or discard this patch.
src/Workflow/Deployment.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -14,10 +14,7 @@
 block discarded – undo
14 14
 
15 15
 namespace Netresearch\Kite\Workflow;
16 16
 use Netresearch\Kite\Task;
17
-
18 17
 use Netresearch\Kite\Workflow;
19
-use Netresearch\Kite\Exception;
20
-
21 18
 use Symfony\Component\Console\Input\InputOption;
22 19
 
23 20
 /**
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         if (!$rollback && !$restore) {
89 89
             $this->checkout();
90 90
             $this->release = date($this->get('releaseFormat', 'YmdHis'));
91
-            $this->set('releaseDir', 'releases/' . $this->release);
91
+            $this->set('releaseDir', 'releases/'.$this->release);
92 92
             $this->release();
93 93
             $this->shareResources();
94 94
         }
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
     protected function activate()
196 196
     {
197 197
         $sub = $this->iterate('{nodes}', 'node');
198
-        $sub->message('<step>Activating ' . ($this->release ? 'new' : 'latest') . ' release</step>');
198
+        $sub->message('<step>Activating '.($this->release ? 'new' : 'latest').' release</step>');
199 199
         $sub->callback(
200
-            function (Task\IterateTask $iterator) {
200
+            function(Task\IterateTask $iterator) {
201 201
                 $links = $iterator->remoteShell('echo "`readlink previous`;`readlink current`;`readlink next`"', '{node.deployPath}');
202 202
                 list($previous, $current, $next) = explode(';', $links);
203 203
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
                     $commands = array("ln -sfn $next current; rm next");
215 215
                     if ($current) {
216
-                        $from = '<comment>' . basename($current) . '</comment>';
216
+                        $from = '<comment>'.basename($current).'</comment>';
217 217
                         array_unshift($commands, "ln -s $current previous");
218 218
                         if ($previous) {
219 219
                             array_unshift($commands, "rm previous; rm -rf $previous");
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         $sub = $this->iterate('{nodes}', 'node');
253 253
         $sub->message('<step>Restoring previous release</step>');
254 254
         $sub->callback(
255
-            function (Task\IterateTask $iterator) use (&$firstPreviousRelease) {
255
+            function(Task\IterateTask $iterator) use (&$firstPreviousRelease) {
256 256
                 $links = $iterator->remoteShell('echo "`readlink previous`;`readlink current`;`readlink next`"', '{node.deployPath}');
257 257
                 list($previous, $current, $next) = explode(';', $links);
258 258
                 if (!$previous) {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                     $commands = array("ln -sfn $previous current; rm previous");
270 270
                     if ($current) {
271 271
                         array_unshift($commands, "ln -s $current next");
272
-                        $from = '<comment>' . basename($current) . '</comment>';
272
+                        $from = '<comment>'.basename($current).'</comment>';
273 273
                     } else {
274 274
                         $from = '<warning>none</warning>';
275 275
                     }
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         $sub = $this->iterate('{shared}', array('type' => 'entries'));
293 293
         $sub->message('<step>Linking shared resources</step>');
294 294
         $sub->callback(
295
-            function (Task\IterateTask $iterator) {
295
+            function(Task\IterateTask $iterator) {
296 296
                 $type = $iterator->get('type');
297 297
                 if (!in_array($type, array('dirs', 'files'), true)) {
298 298
                     $iterator->doExit('shared may only contain keys "dirs" or "files"', 1);
@@ -311,13 +311,13 @@  discard block
 block discarded – undo
311 311
                     }
312 312
 
313 313
                     $commands[] = 'cd {releaseDir}';
314
-                    $commands[] = 'rm -rf ' . $entry;
314
+                    $commands[] = 'rm -rf '.$entry;
315 315
                     if ($dirName) {
316
-                        $commands[] = 'mkdir -p ' . $dirName;
317
-                        $commands[] = 'cd ' . $dirName;
316
+                        $commands[] = 'mkdir -p '.$dirName;
317
+                        $commands[] = 'cd '.$dirName;
318 318
                         $subDirCount += substr_count($dirName, '/') + 1;
319 319
                     }
320
-                    $commands[] = 'ln -s ' . str_repeat('../', $subDirCount) . $shareDir . '/' . $entry;
320
+                    $commands[] = 'ln -s '.str_repeat('../', $subDirCount).$shareDir.'/'.$entry;
321 321
 
322 322
                     $iterator->remoteShell($commands, '{node.deployPath}');
323 323
                 }
Please login to merge, or discard this patch.
src/Workflow/StageSelect.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -13,12 +13,9 @@
 block discarded – undo
13 13
  */
14 14
 
15 15
 namespace Netresearch\Kite\Workflow;
16
-use Netresearch\Kite\Service\Factory;
17 16
 use Netresearch\Kite\Task;
18
-
19 17
 use Netresearch\Kite\Workflow;
20 18
 use Netresearch\Kite\Exception;
21
-
22 19
 use Symfony\Component\Console\Output\OutputInterface;
23 20
 
24 21
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     public function assemble()
132 132
     {
133 133
         $this->callback(
134
-            function () {
134
+            function() {
135 135
                 $stages = $this->get('stages');
136 136
                 $stageOptions = array();
137 137
                 // Begin keys from 1
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     $task = clone $this->task;
177 177
                     foreach ($stages[$stage] as $key => $value) {
178 178
                         // Avoid variables overriding parent variables, by prefixing with this
179
-                        $task->set('this.' . $key, $value);
179
+                        $task->set('this.'.$key, $value);
180 180
                     }
181 181
                     $this->addTask($task);
182 182
                 }
Please login to merge, or discard this patch.
presets/common.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         ],
50 50
         'task' => [
51 51
             'type' => 'callback',
52
-            'callback' => function (\Netresearch\Kite\Job $job) {
52
+            'callback' => function(\Netresearch\Kite\Job $job) {
53 53
                 $git = $job->get('git');
54 54
                 $command = $job->get('cmd');
55 55
                 foreach ($job->get('composer.packages') as $package) {
Please login to merge, or discard this patch.
src/ExpressionLanguage/Lexer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,10 +172,10 @@
 block discarded – undo
172 172
                 }
173 173
                 if ($isTest) {
174 174
                     if ($isFunctionCall) {
175
-                        throw new SyntaxError('Can\'t use function return value in write context',  $stream->current->cursor);
175
+                        throw new SyntaxError('Can\'t use function return value in write context', $stream->current->cursor);
176 176
                     }
177 177
                     if (!$stream->current->test(Token::PUNCTUATION_TYPE, ')')) {
178
-                        throw new SyntaxError('Expected )',  $stream->current->cursor);
178
+                        throw new SyntaxError('Expected )', $stream->current->cursor);
179 179
                     }
180 180
                     $tokens[] = new Token(Token::STRING_TYPE, implode('.', $names), $token->cursor);
181 181
                 } else {
Please login to merge, or discard this patch.
src/Task/IncludeTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     public function execute()
52 52
     {
53 53
         ob_start(
54
-            function ($output) {
54
+            function($output) {
55 55
                 $this->console->output($output, false);
56 56
                 return '';
57 57
             }, 2, 0
Please login to merge, or discard this patch.
src/Workflow/RenderReference.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function assemble()
61 61
     {
62 62
         $this->callback(
63
-            function () {
63
+            function() {
64 64
                 $this->findLoaders();
65 65
                 $file = $this->get('file');
66 66
                 $this->console->getFilesystem()->ensureDirectoryExists(dirname($file));
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         foreach (['task', 'workflow'] as $type) {
111 111
             $lines[] = '';
112
-            $lines[] = ucfirst($type) . 's';
112
+            $lines[] = ucfirst($type).'s';
113 113
             $lines[] = str_repeat('=', strlen($type) + 1);
114 114
             $lines[] = '';
115 115
             $taskObjects = $this->loadTaskObjects($type);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     $lines[] = 'Options';
140 140
                     $lines[] = '```````';
141 141
                     $lines[] = '';
142
-                    $this->renderVariables($lines, $taskVariables, $type . '-' . $name);
142
+                    $this->renderVariables($lines, $taskVariables, $type.'-'.$name);
143 143
                 }
144 144
                 if ($taskCommonVariables) {
145 145
                     $lines[] = 'Common options';
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $keys = ['type', 'default', 'required', 'label'];
176 176
         $lines[] = '   * - Name';
177 177
         foreach ($keys as $key) {
178
-            $lines[] = '     - ' . ucfirst($key);
178
+            $lines[] = '     - '.ucfirst($key);
179 179
         }
180 180
 
181 181
         foreach ($variables as $configName => $config) {
@@ -184,11 +184,11 @@  discard block
 block discarded – undo
184 184
             }
185 185
             $lines[] = '   * - ';
186 186
             $lines[] = '';
187
-            $lines[] = '       .. |' . $anchorPrefix . '-' . $configName . '| replace:: ' . $configName;
187
+            $lines[] = '       .. |'.$anchorPrefix.'-'.$configName.'| replace:: '.$configName;
188 188
             $lines[] = '';
189
-            $lines[] = '       .. _' . $anchorPrefix . '-' . $configName . ':';
189
+            $lines[] = '       .. _'.$anchorPrefix.'-'.$configName.':';
190 190
             $lines[] = '';
191
-            $lines[] = '       ' . $configName;
191
+            $lines[] = '       '.$configName;
192 192
             $lines[] = '';
193 193
             foreach ($keys as $key) {
194 194
                 if (!array_key_exists($key, $config)) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                     $v = $config[$key];
198 198
                     $value = $v === null ? 'null' : ($v === true ? 'true' : ($v === false ? 'false' : $v));
199 199
                     if (is_string($value)) {
200
-                        $value = ':code:`' . $value . '`';
200
+                        $value = ':code:`'.$value.'`';
201 201
                     }
202 202
                 } elseif ($key === 'required') {
203 203
                     $value = $config[$key] === true ? 'X' : $config[$key];
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
                     $value = $config[$key];
206 206
                 }
207 207
                 if (is_array($value)) {
208
-                    $value = "\n\n       .. code::php\n\n           " . str_replace("\n", "\n\n           ", call_user_func('print' . '_r', $value, true)) . "\n\n";
208
+                    $value = "\n\n       .. code::php\n\n           ".str_replace("\n", "\n\n           ", call_user_func('print'.'_r', $value, true))."\n\n";
209 209
                 } else {
210 210
                     $value = str_replace("\n", "\n\n       ", $value);
211 211
                 }
212
-                $value = preg_replace('/\{@see\s+(' . implode('|', array_keys($variables)) . ')\}/', '|' . $anchorPrefix . '-$1|_', $value);
213
-                $lines[] = '     - ' . $value;
212
+                $value = preg_replace('/\{@see\s+('.implode('|', array_keys($variables)).')\}/', '|'.$anchorPrefix.'-$1|_', $value);
213
+                $lines[] = '     - '.$value;
214 214
             }
215 215
         }
216 216
         $lines[] = '';
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
     {
226 226
         static $commonVars;
227 227
         if (!is_array($commonVars)) {
228
-            $className = 'NetresearchKiteTask' . uniqid();
229
-            eval('class ' . $className . ' extends \\Netresearch\\Kite\\Task {}');
228
+            $className = 'NetresearchKiteTask'.uniqid();
229
+            eval('class '.$className.' extends \\Netresearch\\Kite\\Task {}');
230 230
             $instance = new $className($this);
231 231
             $commonVars = $instance->get('_variableConfiguration');
232 232
         }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     protected function loadTaskObjects($type)
244 244
     {
245 245
         $objects = [];
246
-        $requiredType = 'Netresearch\\Kite\\' . ucfirst($type);
246
+        $requiredType = 'Netresearch\\Kite\\'.ucfirst($type);
247 247
         foreach ($this->factory->getNamespaces($type) as $namespace) {
248 248
             $namespaceLength = strlen($namespace);
249 249
             if ($dir = $this->findDirectoryForNamespace($namespace)) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                     if (substr($file, -4) !== '.php') {
252 252
                         continue;
253 253
                     }
254
-                    $class = $namespace . '\\' . substr(strtr($file, '/', '\\'), 0, -4);
254
+                    $class = $namespace.'\\'.substr(strtr($file, '/', '\\'), 0, -4);
255 255
                     $reflectionClass = new \ReflectionClass($class);
256 256
                     if (!$reflectionClass->isSubclassOf($requiredType) || !$reflectionClass->isInstantiable()) {
257 257
                         continue;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                     continue;
339 339
                 }
340 340
                 foreach ($dirs as $dir) {
341
-                    if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
341
+                    if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) {
342 342
                         return $file;
343 343
                     }
344 344
                 }
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
             // PSR-4 fallback dirs
348 348
             foreach ($loader->getFallbackDirsPsr4() as $dir) {
349
-                if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
349
+                if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
350 350
                     return $file;
351 351
                 }
352 352
             }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
             foreach ($loader->getPrefixes() as $prefix => $dirs) {
365 365
                 if (0 === strpos($namespace, $prefix)) {
366 366
                     foreach ($dirs as $dir) {
367
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
367
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
368 368
                             return $file;
369 369
                         }
370 370
                     }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 
374 374
             // PSR-0 fallback dirs
375 375
             foreach ($loader->getFallbackDirs() as $dir) {
376
-                if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
376
+                if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
377 377
                     return $file;
378 378
                 }
379 379
             }
Please login to merge, or discard this patch.