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.

Session::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BFW\Core\AppSystems;
4
5
class Session extends AbstractSystem
6
{
7
    /**
8
     * Initialize sessions system
9
     * Automaticaly destroy cookie if browser quit and start sessions
10
     * 
11
     * @return void
12
     */
13
    public function __construct()
14
    {
15
        if ($this->obtainRunSession() === false) {
16
            return;
17
        }
18
19
        //Destroy session cookie if browser quit
20
        session_set_cookie_params(0);
21
22
        //Run session
23
        session_start();
24
    }
25
    
26
    /**
27
     * {@inheritdoc}
28
     * 
29
     * @return null
30
     */
31
    public function __invoke()
32
    {
33
        return null;
34
    }
35
    
36
    /**
37
     * Obtain the value of the option runSession passed to Application
38
     * 
39
     * @return boolean
40
     */
41
    protected function obtainRunSession(): bool
42
    {
43
        return \BFW\Application::getInstance()
44
            ->getOptions()
45
            ->getValue('runSession')
46
        ;
47
    }
48
}
49