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 = 24-25 lines in 2 locations

src/OperationContext.php 2 locations

@@ 133-157 (lines=25) @@
130
    /**
131
     * {@inheritdoc}
132
     */
133
    public function setFilter(array $propertyFilters)
134
    {
135
        $filters = [];
136
        foreach ($propertyFilters as $filter) {
137
            $filter = trim((string) $filter);
138
            if ($filter === '') {
139
                continue;
140
            }
141
142
            if (self::PROPERTIES_WILDCARD === $filter) {
143
                $filters[] = self::PROPERTIES_WILDCARD;
144
                break;
145
            }
146
147
            if (stripos($filter, ',') !== false) {
148
                throw new \InvalidArgumentException('Filter must not contain a comma!');
149
            }
150
151
            $filters[] = $filter;
152
        }
153
154
        $this->filter = $filters;
155
156
        return $this;
157
    }
158
159
    /**
160
     * {@inheritdoc}
@@ 314-337 (lines=24) @@
311
    /**
312
     * {@inheritdoc}
313
     */
314
    public function setRenditionFilter(array $renditionFilter)
315
    {
316
        $filters = [];
317
        foreach ($renditionFilter as $filter) {
318
            $filter = trim((string) $filter);
319
            if ($filter === '') {
320
                continue;
321
            }
322
323
            if (stripos($filter, ',') !== false) {
324
                throw new \InvalidArgumentException('Rendition must not contain a comma!');
325
            }
326
327
            $filters[] = $filter;
328
        }
329
330
        if (count($filters) === 0) {
331
            $filters[] = Constants::RENDITION_NONE;
332
        }
333
334
        $this->renditionFilter = $filters;
335
336
        return $this;
337
    }
338
339
340
    /**