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   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 5
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A pollute() 0 12 2
A injectToGlobal() 0 11 3
1
<?php
2
namespace Gongo\MercifulPolluter;
3
4
class Session extends Base
5
{
6
    public function pollute()
7
    {
8
        if (session_id() === '') {
9
            trigger_error(
10
                'The session not yet started (Ignoring)',
11
                E_USER_WARNING
12
            );
13
            return;
14
        }
15
16
        $this->injectToGlobal($_SESSION);
17
    }
18
19
    protected function injectToGlobal(array $theVariables)
20
    {
21
        foreach ($theVariables as $name => $value) {
22
            if ($this->ignoringVariable($name)) {
23
                continue;
24
            }
25
26
            $GLOBALS[$name] = $value;
27
            $_SESSION[$name] =& $GLOBALS[$name];
28
        }
29
    }
30
}
31