Completed
Push — master ( bbfb28...e849e1 )
by Hannes
01:48
created
src/Expectation/ReturnTypeExpectation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
             case 'object':
33 33
             case 'resource':
34 34
             case 'null':
35
-                $this->strategy = function (Result $result) use ($type) {
35
+                $this->strategy = function(Result $result) use ($type) {
36 36
                     return 0 == strcasecmp(gettype($result->getReturnValue()), $type);
37 37
                 };
38 38
                 break;
39 39
             default:
40
-                $this->strategy = function (Result $result) use ($type) {
40
+                $this->strategy = function(Result $result) use ($type) {
41 41
                     return $result->getReturnValue() instanceof $type;
42 42
                 };
43 43
                 break;
Please login to merge, or discard this patch.
features/bootstrap/FeatureContext.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Behat\Behat\Tester\Exception\PendingException;
4 3
 use Behat\Behat\Context\Context;
5 4
 use Behat\Behat\Context\SnippetAcceptingContext;
6 5
 use Behat\Gherkin\Node\PyStringNode;
7
-use Behat\Gherkin\Node\TableNode;
8 6
 
9 7
 /**
10 8
  * Defines application features from the specific context.
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     }
70 70
 
71 71
 
72
-   /**
72
+    /**
73 73
      * @Given the command line argument :argument
74 74
      */
75 75
     public function theCommandLineArgument($argument)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function __construct()
45 45
     {
46
-        $this->sourceDir = sys_get_temp_dir() . '/readmetester-behat-' . rand() . '/';
46
+        $this->sourceDir = sys_get_temp_dir().'/readmetester-behat-'.rand().'/';
47 47
         mkdir($this->sourceDir);
48 48
     }
49 49
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function aMarkdownFile(PyStringNode $string)
59 59
     {
60
-        file_put_contents($this->sourceDir . rand() . '.md', (string)$string);
60
+        file_put_contents($this->sourceDir.rand().'.md', (string)$string);
61 61
     }
62 62
 
63 63
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function aSourceFile($filename, PyStringNode $string)
67 67
     {
68
-        file_put_contents($this->sourceDir . $filename, (string)$string);
68
+        file_put_contents($this->sourceDir.$filename, (string)$string);
69 69
     }
70 70
 
71 71
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function iRunReadmeTester()
85 85
     {
86
-        $command = realpath('bin/readme-tester') . " test {$this->sourceDir} " . implode(' ', $this->args);
86
+        $command = realpath('bin/readme-tester')." test {$this->sourceDir} ".implode(' ', $this->args);
87 87
 
88 88
         $cwd = getcwd();
89 89
         chdir($this->sourceDir);
Please login to merge, or discard this patch.
src/SourceFileIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->filename)) as $fileInfo) {
30 30
             $basePath = realpath($this->filename);
31 31
             if (in_array(strtolower($fileInfo->getExtension()), ['md', 'mdown', 'markdown'])) {
32
-                $displayPath = rtrim($this->filename, '/') . str_replace($basePath, '', $fileInfo->getRealPath());
32
+                $displayPath = rtrim($this->filename, '/').str_replace($basePath, '', $fileInfo->getRealPath());
33 33
                 yield $displayPath => $this->readFile($fileInfo->getRealPath());
34 34
             }
35 35
         }
Please login to merge, or discard this patch.
src/Parser/Parser.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -1733,6 +1733,9 @@  discard block
 block discarded – undo
1733 1733
         return '"' . substr($this->string, $this->position) . '"';
1734 1734
     }
1735 1735
 
1736
+    /**
1737
+     * @param string $expecting
1738
+     */
1736 1739
     protected function report($position, $expecting)
1737 1740
     {
1738 1741
         if ($this->cut) {
@@ -1755,6 +1758,9 @@  discard block
 block discarded – undo
1755 1758
         return implode(', ', end($this->warnings));
1756 1759
     }
1757 1760
 
1761
+    /**
1762
+     * @param string $_string
1763
+     */
1758 1764
     public function parse($_string)
1759 1765
     {
1760 1766
         $this->string = $_string;
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         if ($_success) {
110
-            $this->value = call_user_func(function () use (&$examples) {
110
+            $this->value = call_user_func(function() use (&$examples) {
111 111
                 return array_values(array_filter($examples));
112 112
             });
113 113
         }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         }
242 242
 
243 243
         if ($_success) {
244
-            $this->value = call_user_func(function () use (&$annots, &$code) {
244
+            $this->value = call_user_func(function() use (&$annots, &$code) {
245 245
                 return new Definition($code, ...(array)$annots);
246 246
             });
247 247
         }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         }
415 415
 
416 416
         if ($_success) {
417
-            $this->value = call_user_func(function () use (&$annots, &$code) {
417
+            $this->value = call_user_func(function() use (&$annots, &$code) {
418 418
                 return new Definition($code, ...(array)$annots);
419 419
             });
420 420
         }
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
         }
478 478
 
479 479
         if ($_success) {
480
-            $this->value = call_user_func(function () use (&$blocks) {
480
+            $this->value = call_user_func(function() use (&$blocks) {
481 481
                 return call_user_func_array('array_merge', $blocks);
482 482
             });
483 483
         }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         }
597 597
 
598 598
         if ($_success) {
599
-            $this->value = call_user_func(function () use (&$annots) {
599
+            $this->value = call_user_func(function() use (&$annots) {
600 600
                 return array_filter($annots);
601 601
             });
602 602
         }
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
         }
712 712
 
713 713
         if ($_success) {
714
-            $this->value = call_user_func(function () use (&$name, &$args) {
714
+            $this->value = call_user_func(function() use (&$name, &$args) {
715 715
                 return new Annotation($name, ...$args);
716 716
             });
717 717
         }
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
         }
787 787
 
788 788
         if ($_success) {
789
-            $this->value = call_user_func(function () use (&$string) {
789
+            $this->value = call_user_func(function() use (&$string) {
790 790
                 return $string;
791 791
             });
792 792
         }
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
         }
828 828
 
829 829
         if ($_success) {
830
-            $this->value = call_user_func(function () {
830
+            $this->value = call_user_func(function() {
831 831
                 return '';
832 832
             });
833 833
         }
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
         }
949 949
 
950 950
         if ($_success) {
951
-            $this->value = call_user_func(function () use (&$string) {
951
+            $this->value = call_user_func(function() use (&$string) {
952 952
                 return implode($string);
953 953
             });
954 954
         }
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
         }
990 990
 
991 991
         if ($_success) {
992
-            $this->value = call_user_func(function () {
992
+            $this->value = call_user_func(function() {
993 993
                 return '"';
994 994
             });
995 995
         }
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
         }
1404 1404
 
1405 1405
         if ($_success) {
1406
-            $this->value = call_user_func(function () use (&$code) {
1406
+            $this->value = call_user_func(function() use (&$code) {
1407 1407
                 return new CodeBlock($code);
1408 1408
             });
1409 1409
         }
@@ -1574,7 +1574,7 @@  discard block
 block discarded – undo
1574 1574
         }
1575 1575
 
1576 1576
         if ($_success) {
1577
-            $this->value = call_user_func(function () {
1577
+            $this->value = call_user_func(function() {
1578 1578
                 
1579 1579
             });
1580 1580
         }
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
         }
1678 1678
 
1679 1679
         if ($_success) {
1680
-            $this->value = call_user_func(function () {
1680
+            $this->value = call_user_func(function() {
1681 1681
                 
1682 1682
             });
1683 1683
         }
@@ -1724,7 +1724,7 @@  discard block
 block discarded – undo
1724 1724
         }
1725 1725
 
1726 1726
         if ($_success) {
1727
-            $this->value = call_user_func(function () {
1727
+            $this->value = call_user_func(function() {
1728 1728
                 
1729 1729
             });
1730 1730
         }
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
 
2115 2115
     private function rest()
2116 2116
     {
2117
-        return '"' . substr($this->string, $this->position) . '"';
2117
+        return '"'.substr($this->string, $this->position).'"';
2118 2118
     }
2119 2119
 
2120 2120
     protected function report($position, $expecting)
Please login to merge, or discard this patch.
bob_config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 desc('Build parser');
41 41
 task('build_parser', ['src/Parser/Parser.php']);
42 42
 
43
-$parserFiles = fileList('*.peg')->in([__DIR__ . '/src/Parser']);
43
+$parserFiles = fileList('*.peg')->in([__DIR__.'/src/Parser']);
44 44
 
45 45
 fileTask('src/Parser/Parser.php', $parserFiles, function() {
46 46
     sh('vendor/bin/phpeg generate src/Parser/Parser.peg', null, ['failOnError' => true]);
Please login to merge, or discard this patch.
src/Expectation/Regexp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     private function isRegexp(string $input): bool
42 42
     {
43
-        set_error_handler(function () {
43
+        set_error_handler(function() {
44 44
         });
45 45
         $result = preg_match($input, '');
46 46
         restore_error_handler();
Please login to merge, or discard this patch.