GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — thruway-0.4 ( f57a73...7ca568 )
by Cees-Jan
17:12 queued 07:19
created

InternalClient   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10
wmc 3
lcom 1
cbo 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setEventManager() 0 4 1
A onSessionStart() 0 4 1
A onSessionEnd() 0 4 1
1
<?php
2
namespace WyriHaximus\Ratchet\Websocket;
3
4
use Cake\Event\EventManager;
5
use Thruway\Peer\Client;
6
use WyriHaximus\Ratchet\Event\OnSessionEndEvent;
7
use WyriHaximus\Ratchet\Event\OnSessionStartEvent;
8
9
class InternalClient extends Client
10
{
11
    /**
12
     * @var EventManager
13
     */
14
    private $eventManager;
15 1
16
    /**
17 1
     * @param EventManager $eventManager
18 1
     */
19
    public function setEventManager(EventManager $eventManager)
20
    {
21
        $this->eventManager = $eventManager;
22
    }
23 1
24
    /**
25 1
     * @param \Thruway\ClientSession $session
26 1
     * @param \Thruway\Transport\TransportInterface $transport
27
     */
28
    public function onSessionStart($session, $transport)
29
    {
30
        $this->eventManager->dispatch(OnSessionStartEvent::create($this->getRealm(), $session, $transport));
31
    }
32
33
    /**
34
     * @param \Thruway\ClientSession $session
35
     */
36
    public function onSessionEnd($session)
37
    {
38
        $this->eventManager->dispatch(OnSessionEndEvent::create($this->getRealm(), $session));
39
    }
40
}
41