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 ( e01879...7e1050 )
by Calima
08:53
created
vendor/composer/ClassLoader.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -341,6 +341,10 @@
 block discarded – undo
341 341
         return $file;
342 342
     }
343 343
 
344
+    /**
345
+     * @param string $class
346
+     * @param string $ext
347
+     */
344 348
     private function findFileWithExtension($class, $ext)
345 349
     {
346 350
         // PSR-4 lookup
Please login to merge, or discard this patch.
vendor/symfony/console/Symfony/Component/Console/Application.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -1098,6 +1098,9 @@  discard block
 block discarded – undo
1098 1098
         $this->defaultCommand = $commandName;
1099 1099
     }
1100 1100
 
1101
+    /**
1102
+     * @param string $string
1103
+     */
1101 1104
     private function stringWidth($string)
1102 1105
     {
1103 1106
         if (!function_exists('mb_strwidth')) {
@@ -1111,6 +1114,9 @@  discard block
 block discarded – undo
1111 1114
         return mb_strwidth($string, $encoding);
1112 1115
     }
1113 1116
 
1117
+    /**
1118
+     * @param integer $width
1119
+     */
1114 1120
     private function splitStringByWidth($string, $width)
1115 1121
     {
1116 1122
         // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -482,8 +482,8 @@  discard block
 block discarded – undo
482 482
     public function findNamespace($namespace)
483 483
     {
484 484
         $allNamespaces = $this->getNamespaces();
485
-        $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace);
486
-        $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces);
485
+        $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]) . '[^:]*'; }, $namespace);
486
+        $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces);
487 487
 
488 488
         if (empty($namespaces)) {
489 489
             $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
@@ -526,10 +526,10 @@  discard block
 block discarded – undo
526 526
     public function find($name)
527 527
     {
528 528
         $allCommands = array_keys($this->commands);
529
-        $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
530
-        $commands = preg_grep('{^'.$expr.'}', $allCommands);
529
+        $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]) . '[^:]*'; }, $name);
530
+        $commands = preg_grep('{^' . $expr . '}', $allCommands);
531 531
 
532
-        if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) {
532
+        if (empty($commands) || count(preg_grep('{^' . $expr . '$}', $commands)) < 1) {
533 533
             if (false !== $pos = strrpos($name, ':')) {
534 534
                 // check if a namespace exists and contains commands
535 535
                 $this->findNamespace(substr($name, 0, $pos));
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
         // filter out aliases for commands which are already on the list
553 553
         if (count($commands) > 1) {
554 554
             $commandList = $this->commands;
555
-            $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) {
555
+            $commands = array_filter($commands, function($nameOrAlias) use ($commandList, $commands) {
556 556
                 $commandName = $commandList[$nameOrAlias]->getName();
557 557
 
558 558
                 return $commandName === $nameOrAlias || !in_array($commandName, $commands);
@@ -921,12 +921,12 @@  discard block
 block discarded – undo
921 921
         return new InputDefinition(array(
922 922
             new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
923 923
 
924
-            new InputOption('--help',           '-h', InputOption::VALUE_NONE, 'Display this help message'),
925
-            new InputOption('--quiet',          '-q', InputOption::VALUE_NONE, 'Do not output any message'),
926
-            new InputOption('--verbose',        '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
927
-            new InputOption('--version',        '-V', InputOption::VALUE_NONE, 'Display this application version'),
928
-            new InputOption('--ansi',           '',   InputOption::VALUE_NONE, 'Force ANSI output'),
929
-            new InputOption('--no-ansi',        '',   InputOption::VALUE_NONE, 'Disable ANSI output'),
924
+            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
925
+            new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
926
+            new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
927
+            new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
928
+            new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
929
+            new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
930 930
             new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
931 931
         ));
932 932
     }
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
             proc_close($process);
1003 1003
 
1004 1004
             if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) {
1005
-                return $matches[2].'x'.$matches[1];
1005
+                return $matches[2] . 'x' . $matches[1];
1006 1006
             }
1007 1007
         }
1008 1008
     }
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
             }
1083 1083
         }
1084 1084
 
1085
-        $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2*$threshold; });
1085
+        $alternatives = array_filter($alternatives, function($lev) use ($threshold) { return $lev < 2 * $threshold; });
1086 1086
         asort($alternatives);
1087 1087
 
1088 1088
         return array_keys($alternatives);
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
         $line = '';
1131 1131
         foreach (preg_split('//u', $utf8String) as $char) {
1132 1132
             // test if $char could be appended to current line
1133
-            if (mb_strwidth($line.$char, 'utf8') <= $width) {
1133
+            if (mb_strwidth($line . $char, 'utf8') <= $width) {
1134 1134
                 $line .= $char;
1135 1135
                 continue;
1136 1136
             }
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 
1163 1163
         foreach ($parts as $part) {
1164 1164
             if (count($namespaces)) {
1165
-                $namespaces[] = end($namespaces).':'.$part;
1165
+                $namespaces[] = end($namespaces) . ':' . $part;
1166 1166
             } else {
1167 1167
                 $namespaces[] = $part;
1168 1168
             }
Please login to merge, or discard this patch.
symfony/console/Symfony/Component/Console/Formatter/OutputFormatter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
      *
196 196
      * @param string $string
197 197
      *
198
-     * @return OutputFormatterStyle|bool false if string is not format string
198
+     * @return OutputFormatterStyleInterface|null false if string is not format string
199 199
      */
200 200
     private function createStyleFromString($string)
201 201
     {
Please login to merge, or discard this patch.
console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      *
58 58
      * @param string|null $foreground The style foreground color name
59 59
      * @param string|null $background The style background color name
60
-     * @param array       $options    The style options
60
+     * @param string[]       $options    The style options
61 61
      *
62 62
      * @api
63 63
      */
Please login to merge, or discard this patch.
vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      * Asks the user to select a value.
33 33
      *
34 34
      * @param OutputInterface $output       An Output instance
35
-     * @param string|array    $question     The question to ask
36
-     * @param array           $choices      List of choices to pick from
35
+     * @param string    $question     The question to ask
36
+     * @param string[]           $choices      List of choices to pick from
37 37
      * @param bool|string     $default      The default answer if the user enters nothing
38 38
      * @param bool|int        $attempts     Max number of times to ask before giving up (false by default, which means infinite)
39 39
      * @param string          $errorMessage Message which will be shown if invalid value from choice list would be picked
40 40
      * @param bool            $multiselect  Select more than one value separated by comma
41 41
      *
42
-     * @return int|string|array The selected value or values (the key of the choices array)
42
+     * @return string The selected value or values (the key of the choices array)
43 43
      *
44 44
      * @throws \InvalidArgumentException
45 45
      */
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      * The question will be asked until the user answers by nothing, yes, or no.
231 231
      *
232 232
      * @param OutputInterface $output   An Output instance
233
-     * @param string|array    $question The question to ask
233
+     * @param string    $question The question to ask
234 234
      * @param bool            $default  The default answer if the user enters nothing
235 235
      *
236 236
      * @return bool true if the user has confirmed, false otherwise
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
      * otherwise.
328 328
      *
329 329
      * @param OutputInterface $output       An Output instance
330
-     * @param string|array    $question     The question to ask
330
+     * @param string    $question     The question to ask
331 331
      * @param callable        $validator    A PHP callback
332 332
      * @param int|false       $attempts     Max number of times to ask before giving up (false by default, which means infinite)
333 333
      * @param string          $default      The default answer if none is given by the user
334 334
      * @param array           $autocomplete List of values to autocomplete
335 335
      *
336
-     * @return mixed
336
+     * @return string
337 337
      *
338 338
      * @throws \Exception When any of the validators return an error
339 339
      */
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
     /**
393 393
      * Returns the helper's input stream.
394 394
      *
395
-     * @return string
395
+     * @return resource
396 396
      */
397 397
     public function getInputStream()
398 398
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $output->writeln($messages);
56 56
 
57
-        $result = $this->askAndValidate($output, '> ', function ($picked) use ($choices, $errorMessage, $multiselect) {
57
+        $result = $this->askAndValidate($output, '> ', function($picked) use ($choices, $errorMessage, $multiselect) {
58 58
             // Collapse all spaces.
59 59
             $selectedChoices = str_replace(' ', '', $picked);
60 60
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     // Save cursor position
212 212
                     $output->write("\0337");
213 213
                     // Write highlighted text
214
-                    $output->write('<hl>'.substr($matches[$ofs], $i).'</hl>');
214
+                    $output->write('<hl>' . substr($matches[$ofs], $i) . '</hl>');
215 215
                     // Restore cursor position
216 216
                     $output->write("\0338");
217 217
                 }
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
     public function askHiddenResponse(OutputInterface $output, $question, $fallback = true)
264 264
     {
265 265
         if ('\\' === DIRECTORY_SEPARATOR) {
266
-            $exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
266
+            $exe = __DIR__ . '/../Resources/bin/hiddeninput.exe';
267 267
 
268 268
             // handle code running from a phar
269 269
             if ('phar:' === substr(__FILE__, 0, 5)) {
270
-                $tmpExe = sys_get_temp_dir().'/hiddeninput.exe';
270
+                $tmpExe = sys_get_temp_dir() . '/hiddeninput.exe';
271 271
                 copy($exe, $tmpExe);
272 272
                 $exe = $tmpExe;
273 273
             }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $that = $this;
343 343
 
344
-        $interviewer = function () use ($output, $question, $default, $autocomplete, $that) {
344
+        $interviewer = function() use ($output, $question, $default, $autocomplete, $that) {
345 345
             return $that->ask($output, $question, $default, $autocomplete);
346 346
         };
347 347
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     {
371 371
         $that = $this;
372 372
 
373
-        $interviewer = function () use ($output, $question, $fallback, $that) {
373
+        $interviewer = function() use ($output, $question, $fallback, $that) {
374 374
             return $that->askHiddenResponse($output, $question, $fallback);
375 375
         };
376 376
 
Please login to merge, or discard this patch.
vendor/symfony/console/Symfony/Component/Console/Helper/ProcessHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      * @param Process         $process  The Process
106 106
      * @param callable|null   $callback A PHP callable
107 107
      *
108
-     * @return callable
108
+     * @return \Closure
109 109
      */
110 110
     public function wrapCallback(OutputInterface $output, Process $process, $callback = null)
111 111
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
         $that = $this;
115 115
 
116
-        return function ($type, $buffer) use ($output, $process, $callback, $formatter, $that) {
116
+        return function($type, $buffer) use ($output, $process, $callback, $formatter, $that) {
117 117
             $output->write($formatter->progress(spl_object_hash($process), $that->escapeString($buffer), Process::ERR === $type));
118 118
 
119 119
             if (null !== $callback) {
Please login to merge, or discard this patch.
vendor/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -138,6 +138,9 @@  discard block
 block discarded – undo
138 138
         return isset(self::$formats[$name]) ? self::$formats[$name] : null;
139 139
     }
140 140
 
141
+    /**
142
+     * @param string $message
143
+     */
141 144
     public function setMessage($message, $name = 'message')
142 145
     {
143 146
         $this->messages[$name] = $message;
@@ -473,6 +476,7 @@  discard block
 block discarded – undo
473 476
      * Sets the progress bar maximal steps.
474 477
      *
475 478
      * @param int     The progress bar max steps
479
+     * @param integer $max
476 480
      */
477 481
     private function setMaxSteps($max)
478 482
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -304,8 +304,8 @@  discard block
 block discarded – undo
304 304
     public function setFormat($format)
305 305
     {
306 306
         // try to use the _nomax variant if available
307
-        if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
308
-            $this->format = self::getFormatDefinition($format.'_nomax');
307
+        if (!$this->max && null !== self::getFormatDefinition($format . '_nomax')) {
308
+            $this->format = self::getFormatDefinition($format . '_nomax');
309 309
         } elseif (null !== self::getFormatDefinition($format)) {
310 310
             $this->format = self::getFormatDefinition($format);
311 311
         } else {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         $self = $this;
437 437
         $output = $this->output;
438 438
         $messages = $this->messages;
439
-        $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self, $output, $messages) {
439
+        $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function($matches) use ($self, $output, $messages) {
440 440
             if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) {
441 441
                 $text = call_user_func($formatter, $self, $output);
442 442
             } elseif (isset($messages[$matches[1]])) {
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
             }
447 447
 
448 448
             if (isset($matches[2])) {
449
-                $text = sprintf('%'.$matches[2], $text);
449
+                $text = sprintf('%' . $matches[2], $text);
450 450
             }
451 451
 
452 452
             return $text;
@@ -538,20 +538,20 @@  discard block
 block discarded – undo
538 538
     private static function initPlaceholderFormatters()
539 539
     {
540 540
         return array(
541
-            'bar' => function (ProgressBar $bar, OutputInterface $output) {
541
+            'bar' => function(ProgressBar $bar, OutputInterface $output) {
542 542
                 $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth());
543 543
                 $display = str_repeat($bar->getBarCharacter(), $completeBars);
544 544
                 if ($completeBars < $bar->getBarWidth()) {
545 545
                     $emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar->getProgressCharacter());
546
-                    $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars);
546
+                    $display .= $bar->getProgressCharacter() . str_repeat($bar->getEmptyBarCharacter(), $emptyBars);
547 547
                 }
548 548
 
549 549
                 return $display;
550 550
             },
551
-            'elapsed' => function (ProgressBar $bar) {
551
+            'elapsed' => function(ProgressBar $bar) {
552 552
                 return Helper::formatTime(time() - $bar->getStartTime());
553 553
             },
554
-            'remaining' => function (ProgressBar $bar) {
554
+            'remaining' => function(ProgressBar $bar) {
555 555
                 if (!$bar->getMaxSteps()) {
556 556
                     throw new \LogicException('Unable to display the remaining time if the maximum number of steps is not set.');
557 557
                 }
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 
565 565
                 return Helper::formatTime($remaining);
566 566
             },
567
-            'estimated' => function (ProgressBar $bar) {
567
+            'estimated' => function(ProgressBar $bar) {
568 568
                 if (!$bar->getMaxSteps()) {
569 569
                     throw new \LogicException('Unable to display the estimated time if the maximum number of steps is not set.');
570 570
                 }
@@ -577,16 +577,16 @@  discard block
 block discarded – undo
577 577
 
578 578
                 return Helper::formatTime($estimated);
579 579
             },
580
-            'memory' => function (ProgressBar $bar) {
580
+            'memory' => function(ProgressBar $bar) {
581 581
                 return Helper::formatMemory(memory_get_usage(true));
582 582
             },
583
-            'current' => function (ProgressBar $bar) {
583
+            'current' => function(ProgressBar $bar) {
584 584
                 return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT);
585 585
             },
586
-            'max' => function (ProgressBar $bar) {
586
+            'max' => function(ProgressBar $bar) {
587 587
                 return $bar->getMaxSteps();
588 588
             },
589
-            'percent' => function (ProgressBar $bar) {
589
+            'percent' => function(ProgressBar $bar) {
590 590
                 return floor($bar->getProgressPercent() * 100);
591 591
             },
592 592
         );
Please login to merge, or discard this patch.
vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@
 block discarded – undo
49 49
         require_once self::$fixturesPath.'/FooSubnamespaced2Command.php';
50 50
     }
51 51
 
52
+    /**
53
+     * @param string $text
54
+     */
52 55
     protected function normalizeLineBreaks($text)
53 56
     {
54 57
         return str_replace(PHP_EOL, "\n", $text);
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
         $application = $this->getMock('Symfony\Component\Console\Application', array('doRun'));
709 709
         $application->setAutoExit(false);
710 710
         $application->expects($this->once())
711
-             ->method('doRun')
712
-             ->will($this->throwException($exception));
711
+                ->method('doRun')
712
+                ->will($this->throwException($exception));
713 713
 
714 714
         $exitCode = $application->run(new ArrayInput(array()), new NullOutput());
715 715
 
@@ -723,8 +723,8 @@  discard block
 block discarded – undo
723 723
         $application = $this->getMock('Symfony\Component\Console\Application', array('doRun'));
724 724
         $application->setAutoExit(false);
725 725
         $application->expects($this->once())
726
-             ->method('doRun')
727
-             ->will($this->throwException($exception));
726
+                ->method('doRun')
727
+                ->will($this->throwException($exception));
728 728
 
729 729
         $exitCode = $application->run(new ArrayInput(array()), new NullOutput());
730 730
 
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 
37 37
     public static function setUpBeforeClass()
38 38
     {
39
-        self::$fixturesPath = realpath(__DIR__.'/Fixtures/');
40
-        require_once self::$fixturesPath.'/FooCommand.php';
41
-        require_once self::$fixturesPath.'/Foo1Command.php';
42
-        require_once self::$fixturesPath.'/Foo2Command.php';
43
-        require_once self::$fixturesPath.'/Foo3Command.php';
44
-        require_once self::$fixturesPath.'/Foo4Command.php';
45
-        require_once self::$fixturesPath.'/Foo5Command.php';
46
-        require_once self::$fixturesPath.'/FoobarCommand.php';
47
-        require_once self::$fixturesPath.'/BarBucCommand.php';
48
-        require_once self::$fixturesPath.'/FooSubnamespaced1Command.php';
49
-        require_once self::$fixturesPath.'/FooSubnamespaced2Command.php';
39
+        self::$fixturesPath = realpath(__DIR__ . '/Fixtures/');
40
+        require_once self::$fixturesPath . '/FooCommand.php';
41
+        require_once self::$fixturesPath . '/Foo1Command.php';
42
+        require_once self::$fixturesPath . '/Foo2Command.php';
43
+        require_once self::$fixturesPath . '/Foo3Command.php';
44
+        require_once self::$fixturesPath . '/Foo4Command.php';
45
+        require_once self::$fixturesPath . '/Foo5Command.php';
46
+        require_once self::$fixturesPath . '/FoobarCommand.php';
47
+        require_once self::$fixturesPath . '/BarBucCommand.php';
48
+        require_once self::$fixturesPath . '/FooSubnamespaced1Command.php';
49
+        require_once self::$fixturesPath . '/FooSubnamespaced2Command.php';
50 50
     }
51 51
 
52 52
     protected function normalizeLineBreaks($text)
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     public function testHelp()
98 98
     {
99 99
         $application = new Application();
100
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_gethelp.txt', $this->normalizeLineBreaks($application->getHelp()), '->getHelp() returns a help message');
100
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_gethelp.txt', $this->normalizeLineBreaks($application->getHelp()), '->getHelp() returns a help message');
101 101
     }
102 102
 
103 103
     public function testAll()
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 
479 479
         $application->setCatchExceptions(true);
480 480
         $tester->run(array('command' => 'foo'), array('decorated' => false));
481
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag');
481
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag');
482 482
 
483 483
         $application->setCatchExceptions(false);
484 484
         try {
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
         $application = new Application();
501 501
         $application->add(new \FooCommand());
502 502
         $this->ensureStaticCommandHelp($application);
503
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext1.txt', $this->normalizeLineBreaks($application->asText()), '->asText() returns a text representation of the application');
504
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext2.txt', $this->normalizeLineBreaks($application->asText('foo')), '->asText() returns a text representation of the application');
503
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_astext1.txt', $this->normalizeLineBreaks($application->asText()), '->asText() returns a text representation of the application');
504
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_astext2.txt', $this->normalizeLineBreaks($application->asText('foo')), '->asText() returns a text representation of the application');
505 505
     }
506 506
 
507 507
     /**
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
         $application = new Application();
515 515
         $application->add(new \FooCommand());
516 516
         $this->ensureStaticCommandHelp($application);
517
-        $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml1.txt', $application->asXml(), '->asXml() returns an XML representation of the application');
518
-        $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml2.txt', $application->asXml('foo'), '->asXml() returns an XML representation of the application');
517
+        $this->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/application_asxml1.txt', $application->asXml(), '->asXml() returns an XML representation of the application');
518
+        $this->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/application_asxml2.txt', $application->asXml('foo'), '->asXml() returns an XML representation of the application');
519 519
     }
520 520
 
521 521
     public function testRenderException()
@@ -528,21 +528,21 @@  discard block
 block discarded – undo
528 528
         $tester = new ApplicationTester($application);
529 529
 
530 530
         $tester->run(array('command' => 'foo'), array('decorated' => false));
531
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exception');
531
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exception');
532 532
 
533 533
         $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE));
534 534
         $this->assertContains('Exception trace', $tester->getDisplay(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose');
535 535
 
536 536
         $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false));
537
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getDisplay(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
537
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception2.txt', $tester->getDisplay(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command');
538 538
 
539 539
         $application->add(new \Foo3Command());
540 540
         $tester = new ApplicationTester($application);
541 541
         $tester->run(array('command' => 'foo3:bar'), array('decorated' => false));
542
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
542
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception3.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
543 543
 
544 544
         $tester->run(array('command' => 'foo3:bar'), array('decorated' => true));
545
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
545
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
546 546
 
547 547
         $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
548 548
         $application->setAutoExit(false);
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
         $tester = new ApplicationTester($application);
553 553
 
554 554
         $tester->run(array('command' => 'foo'), array('decorated' => false));
555
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
555
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
556 556
     }
557 557
 
558 558
     public function testRenderExceptionWithDoubleWidthCharacters()
@@ -562,28 +562,28 @@  discard block
 block discarded – undo
562 562
         $application->expects($this->any())
563 563
             ->method('getTerminalWidth')
564 564
             ->will($this->returnValue(120));
565
-        $application->register('foo')->setCode(function () {
565
+        $application->register('foo')->setCode(function() {
566 566
             throw new \Exception('エラーメッセージ');
567 567
         });
568 568
         $tester = new ApplicationTester($application);
569 569
 
570 570
         $tester->run(array('command' => 'foo'), array('decorated' => false));
571
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
571
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception_doublewidth1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
572 572
 
573 573
         $tester->run(array('command' => 'foo'), array('decorated' => true));
574
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
574
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception_doublewidth1decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions');
575 575
 
576 576
         $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
577 577
         $application->setAutoExit(false);
578 578
         $application->expects($this->any())
579 579
             ->method('getTerminalWidth')
580 580
             ->will($this->returnValue(32));
581
-        $application->register('foo')->setCode(function () {
581
+        $application->register('foo')->setCode(function() {
582 582
             throw new \Exception('コマンドの実行中にエラーが発生しました。');
583 583
         });
584 584
         $tester = new ApplicationTester($application);
585 585
         $tester->run(array('command' => 'foo'), array('decorated' => false));
586
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
586
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_renderexception_doublewidth2.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal');
587 587
     }
588 588
 
589 589
     public function testRun()
@@ -609,19 +609,19 @@  discard block
 block discarded – undo
609 609
         $tester = new ApplicationTester($application);
610 610
 
611 611
         $tester->run(array(), array('decorated' => false));
612
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed');
612
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed');
613 613
 
614 614
         $tester->run(array('--help' => true), array('decorated' => false));
615
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed');
615
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed');
616 616
 
617 617
         $tester->run(array('-h' => true), array('decorated' => false));
618
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed');
618
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed');
619 619
 
620 620
         $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false));
621
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed');
621
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed');
622 622
 
623 623
         $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false));
624
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed');
624
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed');
625 625
 
626 626
         $tester->run(array('--ansi' => true));
627 627
         $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed');
@@ -630,10 +630,10 @@  discard block
 block discarded – undo
630 630
         $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed');
631 631
 
632 632
         $tester->run(array('--version' => true), array('decorated' => false));
633
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed');
633
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed');
634 634
 
635 635
         $tester->run(array('-V' => true), array('decorated' => false));
636
-        $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed');
636
+        $this->assertStringEqualsFile(self::$fixturesPath . '/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed');
637 637
 
638 638
         $tester->run(array('command' => 'list', '--quiet' => true));
639 639
         $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed');
@@ -672,10 +672,10 @@  discard block
 block discarded – undo
672 672
         $tester = new ApplicationTester($application);
673 673
 
674 674
         $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false));
675
-        $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed');
675
+        $this->assertSame('called' . PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed');
676 676
 
677 677
         $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false));
678
-        $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed');
678
+        $this->assertSame('called' . PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed');
679 679
     }
680 680
 
681 681
     /**
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
         $application
744 744
             ->register('foo')
745 745
             ->setDefinition(array($def))
746
-            ->setCode(function (InputInterface $input, OutputInterface $output) {})
746
+            ->setCode(function(InputInterface $input, OutputInterface $output) {})
747 747
         ;
748 748
 
749 749
         $input = new ArrayInput(array('command' => 'foo'));
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         $application->setAutoExit(false);
879 879
         $application->setDispatcher($this->getDispatcher());
880 880
 
881
-        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
881
+        $application->register('foo')->setCode(function(InputInterface $input, OutputInterface $output) {
882 882
             $output->write('foo.');
883 883
         });
884 884
 
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
         $application->setAutoExit(false);
899 899
         $application->setCatchExceptions(false);
900 900
 
901
-        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
901
+        $application->register('foo')->setCode(function(InputInterface $input, OutputInterface $output) {
902 902
             throw new \RuntimeException('foo');
903 903
         });
904 904
 
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
         $application->setDispatcher($this->getDispatcher());
913 913
         $application->setAutoExit(false);
914 914
 
915
-        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
915
+        $application->register('foo')->setCode(function(InputInterface $input, OutputInterface $output) {
916 916
             $output->write('foo.');
917 917
 
918 918
             throw new \RuntimeException('foo');
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
         $application->setDispatcher($this->getDispatcher(true));
930 930
         $application->setAutoExit(false);
931 931
 
932
-        $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) {
932
+        $application->register('foo')->setCode(function(InputInterface $input, OutputInterface $output) {
933 933
             $output->write('foo.');
934 934
         });
935 935
 
@@ -957,21 +957,21 @@  discard block
 block discarded – undo
957 957
     protected function getDispatcher($skipCommand = false)
958 958
     {
959 959
         $dispatcher = new EventDispatcher();
960
-        $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use ($skipCommand) {
960
+        $dispatcher->addListener('console.command', function(ConsoleCommandEvent $event) use ($skipCommand) {
961 961
             $event->getOutput()->write('before.');
962 962
 
963 963
             if ($skipCommand) {
964 964
                 $event->disableCommand();
965 965
             }
966 966
         });
967
-        $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($skipCommand) {
967
+        $dispatcher->addListener('console.terminate', function(ConsoleTerminateEvent $event) use ($skipCommand) {
968 968
             $event->getOutput()->write('after.');
969 969
 
970 970
             if (!$skipCommand) {
971 971
                 $event->setExitCode(113);
972 972
             }
973 973
         });
974
-        $dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) {
974
+        $dispatcher->addListener('console.exception', function(ConsoleExceptionEvent $event) {
975 975
             $event->getOutput()->writeln('caught.');
976 976
 
977 977
             $event->setException(new \LogicException('caught.', $event->getExitCode(), $event->getException()));
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
 
992 992
         $tester = new ApplicationTester($application);
993 993
         $tester->run(array());
994
-        $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
994
+        $this->assertEquals('interact called' . PHP_EOL . 'called' . PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
995 995
 
996 996
         $application = new CustomDefaultCommandApplication();
997 997
         $application->setAutoExit(false);
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
         $tester = new ApplicationTester($application);
1000 1000
         $tester->run(array());
1001 1001
 
1002
-        $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
1002
+        $this->assertEquals('interact called' . PHP_EOL . 'called' . PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
1003 1003
     }
1004 1004
 
1005 1005
     public function testCanCheckIfTerminalIsInteractive()
Please login to merge, or discard this patch.
console/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
         $this->assertEquals('not yet', $dialog->ask($this->getOutputStream(), 'Do you have a job?', 'not yet'));
178 178
     }
179 179
 
180
+    /**
181
+     * @param string $input
182
+     */
180 183
     protected function getInputStream($input)
181 184
     {
182 185
         $stream = fopen('php://memory', 'r+', false);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 
145 145
         $question = 'What color was the white horse of Henry IV?';
146 146
         $error = 'This is not a color!';
147
-        $validator = function ($color) use ($error) {
147
+        $validator = function($color) use ($error) {
148 148
             if (!in_array($color, array('white', 'black'))) {
149 149
                 throw new \InvalidArgumentException($error);
150 150
             }
Please login to merge, or discard this patch.