Passed
Push — master ( ce82c1...126939 )
by Бабичев
02:28
created

Session::__construct()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 3
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 3
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Bavix\Context;
4
5
class Session extends Container
6
{
7
8
    /**
9
     * Session constructor.
10
     *
11
     * @param string $password
12
     */
13 7
    public function __construct(?string $password = null)
14
    {
15
        \PHP_SAPI === 'cli' OR \session_id() OR \session_start();
16 7
        parent::__construct($password);
17 7
        $this->store = &$_SESSION;
18 7
    }
19
20
}
21