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.

Code Duplication    Length = 9-10 lines in 3 locations

src/Iterator.php 1 location

@@ 46-54 (lines=9) @@
43
    /**
44
     * @return string
45
     */
46
    public static function reduce(\Traversable $iterator, callable $callback, $initial = null)
47
    {
48
        $callback = \Closure::fromCallable($callback);
49
        iterator_apply(
50
            $iterator,
51
            function ($iterator) use (&$initial, $callback) {
52
                $initial = $callback($initial, $iterator->current(), $iterator->key());
53
                return true;
54
            },
55
            [$iterator]
56
        );
57
        return $initial;

src/AtomicTempFileObject.php 1 location

@@ 149-158 (lines=10) @@
146
     * @param \Iterator $input    [description]
147
     * @param callable  $callback [description]
148
     */
149
    public function process(\Iterator $input, callable $callback)
150
    {
151
        $callback = \Closure::fromCallable($callback);
152
        $input->rewind();
153
        iterator_apply(
154
            $input,
155
            function (\Iterator $iterator) use ($callback) {
156
                $callback($iterator->current(), $iterator->key(), $iterator, $this);
157
                return true;
158
            },
159
            [$input]
160
        );
161
        return $this;

src/AtomicTempFileObjects.php 1 location

@@ 129-138 (lines=10) @@
126
     * @param callable $callback
127
     *   Callback for each item in iterator.
128
     */
129
    public function process(\Iterator $input, callable $callback)
130
    {
131
        $callback = \Closure::fromCallable($callback);
132
        $input->rewind();
133
        iterator_apply(
134
            $input,
135
            function (\Iterator $iterator) use ($callback) {
136
                $callback($iterator->current(), $iterator->key(), $iterator, $this);
137
                return true;
138
            },
139
            [$input]
140
        );
141
        return $this;