Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#790)
by
unknown
18:34
created

Connection::getEdges()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Relay\Connection\Output;
6
7
use GraphQL\Executor\Promise\Promise;
8
use Overblog\GraphQLBundle\Relay\Connection\ConnectionInterface;
9
use Overblog\GraphQLBundle\Relay\Connection\EdgeInterface;
10
use Overblog\GraphQLBundle\Relay\Connection\PageInfoInterface;
11
12
class Connection implements ConnectionInterface
13
{
14
    use DeprecatedPropertyPublicAccessTrait;
15
16
    /** @var EdgeInterface[] */
17
    protected array $edges;
18
19
    protected ?PageInfoInterface $pageInfo;
20
21
    /** @var int|Promise|null Total count or promise that returns the total count */
22
    protected $totalCount = null;
23
24 92
    public function __construct(array $edges = [], PageInfoInterface $pageInfo = null)
25
    {
26 92
        $this->edges = $edges;
27 92
        $this->pageInfo = $pageInfo;
28 92
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 89
    public function getEdges(): array
34
    {
35 89
        return $this->edges;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 2
    public function setEdges(iterable $edges): void
42
    {
43 2
        $this->edges = $edges;
0 ignored issues
show
Documentation Bug introduced by
It seems like $edges of type iterable is incompatible with the declared type Overblog\GraphQLBundle\R...nection\EdgeInterface[] of property $edges.

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...
44 2
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49 71
    public function getPageInfo(): ? PageInfoInterface
50
    {
51 71
        return $this->pageInfo;
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57 1
    public function setPageInfo(PageInfoInterface $pageInfo): void
58
    {
59 1
        $this->pageInfo = $pageInfo;
60 1
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65 57
    public function getTotalCount()
66
    {
67 57
        return $this->totalCount;
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73 4
    public function setTotalCount($totalCount): void
74
    {
75 4
        $this->totalCount = $totalCount;
76 4
    }
77
}
78