SuiteTicket::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace YEntWeChat\Suite\EventHandlers;
4
5
use YEntWeChat\Suite\Ticket;
6
7
class SuiteTicket extends EventHandler
8
{
9
    /**
10
     * VerifyTicket.
11
     *
12
     * @var \EntWeChat\Suite\Ticket
13
     */
14
    protected $ticket;
15
16
    /**
17
     * Constructor.
18
     *
19
     * @param \EntWeChat\Suite\Ticket $ticket
20
     */
21
    public function __construct(Ticket $ticket)
22
    {
23
        $this->ticket = $ticket;
0 ignored issues
show
Documentation Bug introduced by
It seems like $ticket of type object<YEntWeChat\Suite\Ticket> is incompatible with the declared type object<EntWeChat\Suite\Ticket> of property $ticket.

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...
24
    }
25
26
    /**
27
     * {@inheritdoc}.
28
     */
29
    public function handle($message)
30
    {
31
        $this->ticket->setTicket($message->get('SuiteTicket'));
32
    }
33
}
34