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 — master ( 310b67...f3cbc4 )
by Damien
16:56 queued 13:08
created

Session::setAuthnRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: dsmrt
5
 * Date: 1/26/18
6
 * Time: 3:00 PM
7
 */
8
9
namespace flipbox\saml\idp\services;
10
11
use SAML2\AuthnRequest;
12
13
class Session extends \flipbox\saml\core\services\Session
14
{
15
16
    const AUTHNREQUEST_KEY = 'authnrequest.message';
17
    const RELAY_STATE_KEY  = 'relaystate';
18
19
    /**
20
     * @param AuthnRequest $message
21
     * @return $this
22
     */
23 2
    public function setAuthnRequest(AuthnRequest $message)
24
    {
25 2
        \Craft::$app->getSession()->set(
26 2
            static::AUTHNREQUEST_KEY,
27 1
            $message
28
        );
29 2
        return $this;
30
    }
31
32
    /**
33
     * @return AuthnRequest|null
34
     */
35 2
    public function getAuthnRequest()
36
    {
37 2
        return \Craft::$app->getSession()->get(
38 2
            static::AUTHNREQUEST_KEY
39
        );
40
    }
41
42
    /**
43
     * @param string $relayState
44
     * @return $this
45
     */
46 2
    public function setRelayState(string $relayState)
47
    {
48 2
        \Craft::$app->getSession()->set(
49 2
            static::RELAY_STATE_KEY,
50 1
            $relayState
51
        );
52 2
        return $this;
53
    }
54
55
    /**
56
     * @return string|null
57
     */
58 2
    public function getRelayState()
59
    {
60 2
        return \Craft::$app->getSession()->get(
61 2
            static::RELAY_STATE_KEY
62
        );
63
    }
64
65
    /**
66
     * @return array
67
     */
68 2
    public function remove()
69
    {
70
        return [
71 2
            \Craft::$app->getSession()->remove(
72 2
                static::AUTHNREQUEST_KEY
73
            ),
74 2
            \Craft::$app->getSession()->remove(
75 2
                static::RELAY_STATE_KEY
76
            ),
77
        ];
78
    }
79
}
80