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
Branch master (fc5653)
by Thomas
03:59
created
src/AtomicTempFileObject.php 3 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     /**
134 134
      * Easy access iterator apply for processing an entire file.
135 135
      *
136
-     * @param  Iterator $input    [description]
136
+     * @param  \Iterator $input    [description]
137 137
      * @param  callable $callback [description]
138 138
      */
139 139
     public function process(\Iterator $input, callable $callback)
@@ -169,8 +169,6 @@  discard block
 block discarded – undo
169 169
     /**
170 170
      * File comparison
171 171
      *
172
-     * @param string $filename
173
-     *   The file to check against.
174 172
      *
175 173
      * @return bool
176 174
      *   True if the contents of this file matches the contents of $filename.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $callback = \Closure::fromCallable($callback);
142 142
         $input->rewind();
143
-        iterator_apply($input, function (\Iterator $iterator) use ($callback) {
143
+        iterator_apply($input, function(\Iterator $iterator) use ($callback) {
144 144
             $callback($iterator->current(), $iterator->key(), $iterator, $this);
145 145
             return true;
146 146
         }, [$input]);
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
         // Rewind this temp file and compare it with the specified file.
195 195
         $identical = true;
196 196
         $tempFile->fseek(0);
197
-        while(!$file->eof()) {
198
-            if($file->fread(8192) != $tempFile->fread(8192)) {
197
+        while (!$file->eof()) {
198
+            if ($file->fread(8192) != $tempFile->fread(8192)) {
199 199
                 $identical = false;
200 200
                 break;
201 201
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,15 +115,12 @@
 block discarded – undo
115 115
         if ($this->persist == self::PERSIST || $this->persist == self::PERSIST_UNCHANGED) {
116 116
             if ($this->persist == self::PERSIST_UNCHANGED || !$this->doCompare()) {
117 117
                 $this->doPersist();
118
-            }
119
-            else {
118
+            } else {
120 119
                 $this->doDiscard();
121 120
             }
122
-        }
123
-        elseif ($this->persist & self::DISCARD) {
121
+        } elseif ($this->persist & self::DISCARD) {
124 122
             $this->doDiscard();
125
-        }
126
-        else {
123
+        } else {
127 124
             // @codeCoverageIgnoreStart
128 125
             trigger_error("Temp file left on device: " . $this->getRealPath(), E_USER_WARNING);
129 126
             // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
src/GlobStreamWrapper.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@
 block discarded – undo
16 16
         self::$root = $root;
17 17
     }
18 18
 
19
+    /**
20
+     * @param string $path
21
+     */
19 22
     protected static function getRootedPath($path)
20 23
     {
21 24
         // Avoid infinite recursion.
Please login to merge, or discard this patch.
src/Iterator.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@
 block discarded – undo
30 30
         return $iterators ? end($iterators) : false;
31 31
     }
32 32
 
33
+    /**
34
+     * @return string
35
+     */
33 36
     public static function reduce(\Traversable $iterator, callable $callback, $initial = null)
34 37
     {
35 38
         $callback = \Closure::fromCallable($callback);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public static function reduce(\Traversable $iterator, callable $callback, $initial = null)
34 34
     {
35 35
         $callback = \Closure::fromCallable($callback);
36
-        iterator_apply($iterator, function ($iterator) use (&$initial, $callback) {
36
+        iterator_apply($iterator, function($iterator) use (&$initial, $callback) {
37 37
             $initial = $callback($initial, $iterator->current(), $iterator->key());
38 38
             return true;
39 39
         }, [$iterator]);
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
     public static function sum(\Traversable $iterator)
44 44
     {
45
-        return self::reduce($iterator, function ($carry, $value, $key) {
45
+        return self::reduce($iterator, function($carry, $value, $key) {
46 46
             return $carry + $value;
47 47
         }, 0);
48 48
     }
49 49
 
50 50
     public static function product(\Traversable $iterator)
51 51
     {
52
-        return self::reduce($iterator, function ($carry, $value, $key) {
52
+        return self::reduce($iterator, function($carry, $value, $key) {
53 53
             return $carry * $value;
54 54
         }, 1);
55 55
     }
@@ -61,28 +61,28 @@  discard block
 block discarded – undo
61 61
 
62 62
     public static function min(\Traversable $iterator)
63 63
     {
64
-        return self::reduce($iterator, function ($carry, $value, $key) {
64
+        return self::reduce($iterator, function($carry, $value, $key) {
65 65
             return $carry < $value ? $carry : $value;
66 66
         }, INF);
67 67
     }
68 68
 
69 69
     public static function max(\Traversable $iterator)
70 70
     {
71
-        return self::reduce($iterator, function ($carry, $value, $key) {
71
+        return self::reduce($iterator, function($carry, $value, $key) {
72 72
             return $carry > $value ? $carry : $value;
73 73
         }, -INF);
74 74
     }
75 75
 
76 76
     public static function concatenate(\Traversable $iterator)
77 77
     {
78
-        return self::reduce($iterator, function ($carry, $value, $key) {
78
+        return self::reduce($iterator, function($carry, $value, $key) {
79 79
             return $carry . $value;
80 80
         }, '');
81 81
     }
82 82
 
83 83
     public static function implode($separator, \Traversable $iterator)
84 84
     {
85
-        $result = self::reduce($iterator, function ($carry, $value, $key) use ($separator) {
85
+        $result = self::reduce($iterator, function($carry, $value, $key) use ($separator) {
86 86
             return $carry . $value . $separator;
87 87
         }, '');
88 88
         $result = mb_substr($result, 0, -mb_strlen($separator));
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
             $value = $value instanceof \Traversable ? self::iterator_to_array_deep($value, $use_keys) : $value;
97 97
             if ($use_keys) {
98 98
                 $result[$key] = $value;
99
-            }
100
-            else {
99
+            } else {
101 100
                 $result[] = $value;
102 101
             }
103 102
         }
Please login to merge, or discard this patch.
src/SortIterator.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@
 block discarded – undo
27 27
         parent::__construct($this->getSortedIterator($iterator));
28 28
     }
29 29
 
30
+    /**
31
+     * @param \Traversable $iterator
32
+     */
30 33
     public function getSortedIterator($iterator)
31 34
     {
32 35
         $sortedIterator = new \ArrayIterator();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $this->direction = $direction;
22 22
         $this->flags = $flags;
23 23
         $this->callback = \Closure::fromCallable($callback);
24
-        $this->realCallback = $direction == self::SORT_ASC ? $this->callback : function ($cmpA, $cmpB) {
24
+        $this->realCallback = $direction == self::SORT_ASC ? $this->callback : function($cmpA, $cmpB) {
25 25
             return ($this->callback)($cmpB, $cmpA);
26 26
         };
27 27
         parent::__construct($this->getSortedIterator($iterator));
Please login to merge, or discard this patch.
src/UniqueIterator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
 
19 19
         if ($flags & self::ASSUME_SORTED) {
20 20
             $this->method = \Closure::fromCallable([$this, 'filterAssumeSorted']);
21
-        }
22
-        else {
21
+        } else {
23 22
             $this->method = \Closure::fromCallable([$this, 'filterAssumeUnsorted']);
24 23
         }
25 24
     }
Please login to merge, or discard this patch.
src/RepeatIterator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,7 @@
 block discarded – undo
88 88
                 parent::rewind();
89 89
                 return $this->valid();
90 90
             }
91
-        }
92
-        elseif (
91
+        } elseif (
93 92
             isset($this->innerLimit) && $this->innerPos >= $this->innerLimit
94 93
             && $this->currentIteration == $this->count - 1
95 94
         ) {
Please login to merge, or discard this patch.
src/DiffIterator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             }
32 32
         }
33 33
         return true;
34
-	}
34
+    }
35 35
 
36 36
     public static function diffCurrent($iterator, $key, $value)
37 37
     {
Please login to merge, or discard this patch.
src/MapIterator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,14 +23,12 @@
 block discarded – undo
23 23
                 if (is_numeric($this->currentKey) && intval($this->currentKey) >= $this->idx) {
24 24
                     $this->idx = intval($this->currentKey) + 1;
25 25
                 }
26
-            }
27
-            else {
26
+            } else {
28 27
                 $this->currentKey = $this->idx++;
29 28
                 $this->currentValue = $result;
30 29
             }
31 30
 
32
-        }
33
-        else {
31
+        } else {
34 32
             $this->currentKey = null;
35 33
             $this->currentValue = null;
36 34
         }
Please login to merge, or discard this patch.
src/GlobIterator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $realPath = $path ? $path : './';
37 37
         $realPath = rtrim($realPath, '/') . '/';
38 38
 
39
-        $flags = $flags &~ \FilesystemIterator::CURRENT_AS_PATHNAME;
39
+        $flags = $flags & ~ \FilesystemIterator::CURRENT_AS_PATHNAME;
40 40
         $flags |= \FilesystemIterator::KEY_AS_PATHNAME;
41 41
         $iterator = new \RecursiveDirectoryIterator($realPath, $flags);
42 42
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         GlobIteratorFileInfo::setPath($iteratorId, $path, $realPath);
58 58
 
59 59
         // Actual glob filtering.
60
-        $fIterator = new \CallbackFilterIterator($rIterator, function (&$current, &$key, $iterator) use ($iteratorId, $regexPattern) {
60
+        $fIterator = new \CallbackFilterIterator($rIterator, function(&$current, &$key, $iterator) use ($iteratorId, $regexPattern) {
61 61
             GlobIteratorFileInfo::setIteratorId($iteratorId);
62 62
             $fileInfo = $current->getFileInfo(GlobIteratorFileInfo::class);
63 63
             if ($this->flags & \FilesystemIterator::CURRENT_AS_PATHNAME) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,15 +62,13 @@
 block discarded – undo
62 62
             $fileInfo = $current->getFileInfo(GlobIteratorFileInfo::class);
63 63
             if ($this->flags & \FilesystemIterator::CURRENT_AS_PATHNAME) {
64 64
                 $current = $fileInfo->getPathname();
65
-            }
66
-            else {
65
+            } else {
67 66
                 $current = $fileInfo;
68 67
             }
69 68
 
70 69
             if ($this->flags & \FilesystemIterator::KEY_AS_FILENAME) {
71 70
                 $key = $fileInfo->getFilename();
72
-            }
73
-            else {
71
+            } else {
74 72
                 $key = $fileInfo->getPathname();
75 73
             }
76 74
             return preg_match($regexPattern, $fileInfo->getPathname());
Please login to merge, or discard this patch.