Completed
Push — master ( 94646b...75f4dc )
by Tim
02:05
created

Phpsession::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
<?php
2
3
namespace SimpleSAML\Module\monitor\TestSuite\Store;
4
5
use \SimpleSAML\Module\monitor\TestConfiguration as TestConfiguration;
6
use \SimpleSAML\Module\monitor\TestCase as TestCase;
7
use \SimpleSAML\Module\monitor\TestData as TestData;
8
9
final class Phpsession extends \SimpleSAML\Module\monitor\TestSuiteFactory
10
{
11
    /**
12
     * @param TestConfiguration $configuration
13
     */
14
    public function __construct($configuration)
15
    {
16
        $this->setCategory('PHP sessions');
17
        parent::__construct($configuration);
18
    }
19
20
    /**
21
     * @return void
22
     */
23
    protected function invokeTestSuite()
24
    {
25
        $input = [
26
            'path' => session_save_path(),
27
            'category' => 'Session storage'
28
        ];
29
        $testData = new TestData($input);
30
31
        $test = new TestCase\FileSystem\FreeSpace($this, $testData);
32
        $testResult = $test->getTestResult();
33
        $this->addTestResult($testResult);
34
35
        //$this->setMessages($test->getMessages());
0 ignored issues
show
Unused Code Comprehensibility introduced by
82% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
36
        $this->setTestResult($testResult);
37
    }
38
}
39