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 ( baa652...f57a73 )
by Cees-Jan
08:46
created

OnSessionEndEvent::realmEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 4
loc 4
rs 10
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
/**
4
 * This file is part of Ratchet for CakePHP.
5
 *
6
 ** (c) 2012 - 2015 Cees-Jan Kiewiet
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WyriHaximus\Ratchet\Event;
13
14
use Cake\Event\Event;
15
use Thruway\ClientSession;
16
17 View Code Duplication
class OnSessionEndEvent extends Event
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
{
19
    const EVENT = 'WyriHaximus.Ratchet.%s..onSessionEnd';
20
21 2
    public static function realmEvent($realm)
22
    {
23 2
        return sprintf(self::EVENT, $realm);
24 2
    }
25 2
26
    public static function create($realm, ClientSession $session)
27
    {
28
        return new static(self::realmEvent($realm), $session, [
29
            'realm' => $realm,
30
        ]);
31 1
    }
32
33 1
    /**
34
     * @return ClientSession
35
     */
36
    public function getSession()
37
    {
38
        return $this->subject();
39
    }
40
}
41