SuiteTicket   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 4 1
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