Failed Conditions
Push — master ( b155cb...bf56a7 )
by Struan
05:04
created

SignatureList   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A count() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MySociety\TheyWorkForYou\DataClass\Statements;
6
7
use MySociety\TheyWorkForYou\DataClass\BaseCollection;
8
9
/**
10
 * @extends BaseCollection<Signature>
11
 */
12
class SignatureList extends BaseCollection {
13
    public function __construct(Signature ...$signatures) {
14
        $this->items = $signatures;
0 ignored issues
show
Documentation Bug introduced by
It seems like $signatures of type array<integer,MySociety\...s\Statements\Signature> is incompatible with the declared type Rutek\Dataclass\T[] of property $items.

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...
15
    }
16
17
    public function count() {
18
        return count($this->items);
19
    }
20
}
21