Invited::getInvitee()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace Igorsgm\TibiaDataApi\Models\Guild;
5
6
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
7
use Igorsgm\TibiaDataApi\Traits\ImmutableTrait;
8
use Igorsgm\TibiaDataApi\Traits\SerializableTrait;
9
use Illuminate\Support\Collection;
10
11
class Invited
12
{
13
    use ImmutableTrait, SerializableTrait;
14
15
    /**
16
     * @var Invitee[]
17
     */
18
    private $invitee;
19
20
    /**
21
     * Invited constructor.
22
     * @param  array  $invitee
23
     * @throws ImmutableException
24
     */
25
    public function __construct(Collection $invitee)
26
    {
27
        $this->handleImmutableConstructor();
28
29
        $this->invitee = $invitee;
0 ignored issues
show
Documentation Bug introduced by
It seems like $invitee of type object<Illuminate\Support\Collection> is incompatible with the declared type array<integer,object<Igo...\Models\Guild\Invitee>> of property $invitee.

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...
30
    }
31
32
    /**
33
     * @return Invitee[]
34
     */
35
    public function getInvitee(): Collection
36
    {
37
        return $this->invitee;
38
    }
39
}
40