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 = 34-36 lines in 5 locations

src/Bindings/Browser/NavigationService.php 3 locations

@@ 187-222 (lines=36) @@
184
     * @param ExtensionDataInterface|null $extension
185
     * @return ObjectInFolderContainerInterface[]
186
     */
187
    public function getDescendants(
188
        $repositoryId,
189
        $folderId,
190
        $depth,
191
        $filter = null,
192
        $includeAllowableActions = false,
193
        IncludeRelationships $includeRelationships = null,
194
        $renditionFilter = Constants::RENDITION_NONE,
195
        $includePathSegment = false,
196
        ExtensionDataInterface $extension = null
197
    ) {
198
        $url = $this->getObjectUrl($repositoryId, $folderId, Constants::SELECTOR_DESCENDANTS);
199
        $url->getQuery()->modify(
200
            array(
201
                Constants::PARAM_DEPTH => (string) $depth,
202
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
203
                Constants::PARAM_RENDITION_FILTER => $renditionFilter,
204
                Constants::PARAM_PATH_SEGMENT => $includePathSegment ? 'true' : 'false',
205
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
206
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
207
            )
208
        );
209
210
        if (!empty($filter)) {
211
            $url->getQuery()->modify(array(Constants::PARAM_FILTER => (string) $filter));
212
        }
213
214
        if ($includeRelationships !== null) {
215
            $url->getQuery()->modify(array(Constants::PARAM_RELATIONSHIPS => (string) $includeRelationships));
216
        }
217
218
        $responseData = $this->read($url)->json();
219
220
        // TODO Implement Cache
221
        return $this->getJsonConverter()->convertDescendants($responseData);
222
    }
223
224
    /**
225
     * Gets the parent folder object for the specified folder object.
@@ 277-312 (lines=36) @@
274
     * @param ExtensionDataInterface|null $extension
275
     * @return ObjectInFolderContainerInterface[]
276
     */
277
    public function getFolderTree(
278
        $repositoryId,
279
        $folderId,
280
        $depth,
281
        $filter = null,
282
        $includeAllowableActions = false,
283
        IncludeRelationships $includeRelationships = null,
284
        $renditionFilter = Constants::RENDITION_NONE,
285
        $includePathSegment = false,
286
        ExtensionDataInterface $extension = null
287
    ) {
288
        $url = $this->getObjectUrl($repositoryId, $folderId, Constants::SELECTOR_FOLDER_TREE);
289
        $url->getQuery()->modify(
290
            array(
291
                Constants::PARAM_DEPTH => (string) $depth,
292
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
293
                Constants::PARAM_RENDITION_FILTER => $renditionFilter,
294
                Constants::PARAM_PATH_SEGMENT => $includePathSegment ? 'true' : 'false',
295
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
296
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
297
            )
298
        );
299
300
        if (!empty($filter)) {
301
            $url->getQuery()->modify(array(Constants::PARAM_FILTER => (string) $filter));
302
        }
303
304
        if ($includeRelationships !== null) {
305
            $url->getQuery()->modify(array(Constants::PARAM_RELATIONSHIPS => (string) $includeRelationships));
306
        }
307
308
        $responseData = $this->read($url)->json();
309
310
        // TODO Implement Cache
311
        return $this->getJsonConverter()->convertDescendants($responseData);
312
    }
313
314
    /**
315
     * Gets the parent folder(s) for the specified non-folder, fileable object
@@ 332-365 (lines=34) @@
329
     * @param ExtensionDataInterface|null $extension
330
     * @return ObjectParentDataInterface[]
331
     */
332
    public function getObjectParents(
333
        $repositoryId,
334
        $objectId,
335
        $filter = null,
336
        $includeAllowableActions = false,
337
        IncludeRelationships $includeRelationships = null,
338
        $renditionFilter = Constants::RENDITION_NONE,
339
        $includeRelativePathSegment = false,
340
        ExtensionDataInterface $extension = null
341
    ) {
342
        $url = $this->getObjectUrl($repositoryId, $objectId, Constants::SELECTOR_PARENTS);
343
        $url->getQuery()->modify(
344
            array(
345
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
346
                Constants::PARAM_RENDITION_FILTER => $renditionFilter,
347
                Constants::PARAM_RELATIVE_PATH_SEGMENT => $includeRelativePathSegment ? 'true' : 'false',
348
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
349
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
350
            )
351
        );
352
353
        if (!empty($filter)) {
354
            $url->getQuery()->modify(array(Constants::PARAM_FILTER => (string) $filter));
355
        }
356
357
        if ($includeRelationships !== null) {
358
            $url->getQuery()->modify(array(Constants::PARAM_RELATIONSHIPS => (string) $includeRelationships));
359
        }
360
361
        $responseData = $this->read($url)->json();
362
363
        // TODO Implement Cache
364
        return $this->getJsonConverter()->convertObjectParents($responseData);
365
    }
366
}
367

src/Bindings/Browser/ObjectService.php 2 locations

@@ 618-653 (lines=36) @@
615
     * @return ObjectDataInterface|null Returns object of type ObjectDataInterface or <code>null</code>
616
     *     if the repository response was empty
617
     */
618
    public function getObject(
619
        $repositoryId,
620
        $objectId,
621
        $filter = null,
622
        $includeAllowableActions = false,
623
        IncludeRelationships $includeRelationships = null,
624
        $renditionFilter = Constants::RENDITION_NONE,
625
        $includePolicyIds = false,
626
        $includeAcl = false,
627
        ExtensionDataInterface $extension = null
628
    ) {
629
        $url = $this->getObjectUrl($repositoryId, $objectId, Constants::SELECTOR_OBJECT);
630
        $url->getQuery()->modify(
631
            array(
632
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
633
                Constants::PARAM_RENDITION_FILTER => $renditionFilter,
634
                Constants::PARAM_POLICY_IDS => $includePolicyIds ? 'true' : 'false',
635
                Constants::PARAM_ACL => $includeAcl ? 'true' : 'false',
636
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
637
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
638
            )
639
        );
640
641
        if (!empty($filter)) {
642
            $url->getQuery()->modify(array(Constants::PARAM_FILTER => (string) $filter));
643
        }
644
645
        if ($includeRelationships !== null) {
646
            $url->getQuery()->modify(array(Constants::PARAM_RELATIONSHIPS => (string) $includeRelationships));
647
        }
648
649
        $responseData = $this->read($url)->json();
650
651
        // TODO: Implement Cache
652
        return $this->getJsonConverter()->convertObject($responseData);
653
    }
654
655
    /**
656
     * Gets the specified information for the object specified by path.
@@ 676-711 (lines=36) @@
673
     * @return ObjectDataInterface|null Returns object of type <code>ObjectDataInterface</code> or <code>null</code>
674
     *      if the repository response was empty
675
     */
676
    public function getObjectByPath(
677
        $repositoryId,
678
        $path,
679
        $filter = null,
680
        $includeAllowableActions = false,
681
        IncludeRelationships $includeRelationships = null,
682
        $renditionFilter = Constants::RENDITION_NONE,
683
        $includePolicyIds = false,
684
        $includeAcl = false,
685
        ExtensionDataInterface $extension = null
686
    ) {
687
        $url = $this->getPathUrl($repositoryId, $path, Constants::SELECTOR_OBJECT);
688
        $url->getQuery()->modify(
689
            array(
690
                Constants::PARAM_ALLOWABLE_ACTIONS => $includeAllowableActions ? 'true' : 'false',
691
                Constants::PARAM_RENDITION_FILTER => $renditionFilter,
692
                Constants::PARAM_POLICY_IDS => $includePolicyIds ? 'true' : 'false',
693
                Constants::PARAM_ACL => $includeAcl ? 'true' : 'false',
694
                Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false',
695
                Constants::PARAM_DATETIME_FORMAT => (string) $this->getDateTimeFormat()
696
            )
697
        );
698
699
        if (!empty($filter)) {
700
            $url->getQuery()->modify(array(Constants::PARAM_FILTER => (string) $filter));
701
        }
702
703
        if ($includeRelationships !== null) {
704
            $url->getQuery()->modify(array(Constants::PARAM_RELATIONSHIPS => (string) $includeRelationships));
705
        }
706
707
        $responseData = $this->read($url)->json();
708
709
        // TODO Implement Cache
710
        return $this->getJsonConverter()->convertObject($responseData);
711
    }
712
713
    /**
714
     * Gets the list of properties for an object.