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

Phpsession   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 30
rs 10
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A invokeTestSuite() 0 15 1
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