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

APPGMembershipList::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 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MySociety\TheyWorkForYou\DataClass\APPGs;
6
7
use MySociety\TheyWorkForYou\DataClass\BaseCollection;
8
9
/**
10
 * @extends BaseCollection<Category>
11
 */
12
class APPGMembershipList extends BaseCollection {
13
    public function __construct(APPGMembership ...$memberships) {
14
        $this->items = $memberships;
0 ignored issues
show
Documentation Bug introduced by
It seems like $memberships of type array<integer,MySociety\...s\APPGs\APPGMembership> 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