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
Pull Request — master (#12)
by Sébastien
02:28
created
src/Selector/Range.php 2 patches
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,17 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Explode the selector to get ranges.
23 23
      *
24
-     * @param $selector
24
+     * @param string $selector
25 25
      *
26 26
      * @return Collection
27 27
      */
28 28
     protected function getRanges($selector)
29 29
     {
30 30
         return Factory::create(explode(';', $selector))->map(
31
+
32
+            /**
33
+             * @param string $range
34
+             */
31 35
             function ($range) {
32 36
                 if ($separator = $this->dotDotSeparator($range) != false) {
33 37
                     return Factory::create([substr($range, 0, $separator), substr($range, $separator + 2)]);
@@ -73,7 +77,7 @@  discard block
 block discarded – undo
73 77
 
74 78
     /**
75 79
      * @param Collection $parameters
76
-     * @param Collection $collectionl
80
+     * @param Collection $collection
77 81
      */
78 82
     public function convert(Collection $parameters, Collection $collection)
79 83
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
     protected function getRanges($selector)
29 29
     {
30 30
         return Factory::create(explode(';', $selector))->map(
31
-            function ($range) {
31
+            function($range) {
32 32
                 if ($separator = $this->dotDotSeparator($range) != false) {
33
-                    return Factory::create([substr($range, 0, $separator), substr($range, $separator + 2)]);
33
+                    return Factory::create([ substr($range, 0, $separator), substr($range, $separator + 2) ]);
34 34
                 }
35 35
                 if (($separator = $this->columnSeparator($range) != false) ||
36 36
                     ($separator = $this->dashSeparator($range) != false)
37 37
                 ) {
38
-                    return Factory::create([substr($range, 0, $separator), substr($range, $separator + 1)]);
38
+                    return Factory::create([ substr($range, 0, $separator), substr($range, $separator + 1) ]);
39 39
                 }
40 40
                 if ($separator = $this->commaSeparator($range) != false) {
41 41
                     return Factory::create(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 }
48 48
 
49 49
                 // just a number here
50
-                return Factory::create([$range, $range]);
50
+                return Factory::create([ $range, $range ]);
51 51
             }
52 52
         );
53 53
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function supports(Collection $parameters)
61 61
     {
62 62
         return $parameters->assert(
63
-            function ($param) {
63
+            function($param) {
64 64
                 if (is_array($param) && count($param) == 2) {
65 65
                     return true;
66 66
                 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $newCollection = Factory::create();
81 81
         $selector      = $parameters->map(
82
-            function ($param) {
82
+            function($param) {
83 83
                 if ((is_array($param) && count($param) == 2)) {
84 84
                     return implode(':', $param);
85 85
                 }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         )->implode(';');
90 90
 
91 91
         return $this->getRanges($selector)->reduce(
92
-            function (Collection $accumulator, Collection $range) use ($collection) {
92
+            function(Collection $accumulator, Collection $range) use ($collection) {
93 93
                 $from = $range->first();
94 94
                 $to   = $range->last();
95 95
                 if ($to >= $from) {
Please login to merge, or discard this patch.