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

SignatureList::count()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
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