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
Push — master ( 352f99...e3c5ff )
by Cees-Jan
09:24
created

JobCollection::fromResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 4
Ratio 100 %
Metric Value
dl 4
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace WyriHaximus\Travis;
4
5
use ArrayIterator;
6
use IteratorAggregate;
7
use Psr\Http\Message\RequestInterface;
8
use Psr\Http\Message\ResponseInterface;
9
10 View Code Duplication
class JobCollection implements EndpointInterface, IteratorAggregate
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    use ParentHasClientAwareTrait;
13
14
    /**
15
     * @var Repository
16
     */
17
    protected $build;
18
19
    /**
20
     * @var array
21
     */
22
    protected $builds;
23
24
    public function __construct(Build $build, array $builds)
25
    {
26
        $this->setParent($build);
27
        $this->build = $build;
0 ignored issues
show
Documentation Bug introduced by
It seems like $build of type object<WyriHaximus\Travis\Build> is incompatible with the declared type object<WyriHaximus\Travis\Repository> of property $build.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
28
        $this->builds = $builds;
29
    }
30
31
    public function getRequest(): RequestInterface
32
    {
33
        // TODO: Implement getRequest() method.
34
    }
35
36
    public function fromResponse(ResponseInterface $response): EndpointInterface
37
    {
38
        // TODO: Implement fromResponse() method.
39
    }
40
41
    /**
42
     * @return Repository
43
     */
44
    public function getBuild()
45
    {
46
        return $this->build;
47
    }
48
49
    public function getIterator()
50
    {
51
        return new ArrayIterator($this->builds);
52
    }
53
}
54