Passed
Push — master ( bb5c60...87d27f )
by Tim
01:35
created

Files   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invokeTest() 0 13 1
A __construct() 0 4 1
1
<?php
2
3
namespace SimpleSAML\Modules\Monitor\TestSuite\Store;
4
5
use \SimpleSAML\Modules\Monitor\State as State;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\Modules\Monitor\State was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use \SimpleSAML\Modules\Monitor\TestConfiguration as TestConfiguration;
7
use \SimpleSAML\Modules\Monitor\TestCase as TestCase;
8
use \SimpleSAML\Modules\Monitor\TestData as TestData;
9
use \SimpleSAML\Modules\Monitor\TestResult as TestResult;
10
use \SimpleSAML\Modules\Monitor\TestSuite\Store as Store;
11
12
final class Files extends \SimpleSAML\Modules\Monitor\TestSuiteFactory
13
{
14
    /**
15
     * @param TestConfiguration $configuration
16
     */
17
    public function __construct($configuration)
18
    {
19
        $this->setCategory('PHP sessions');
20
        parent::__construct($configuration);
21
    }
22
23
    /**
24
     * @return void
25
     */
26
    public function invokeTest()
27
    {
28
        $input = [
29
            'path' => session_save_path(),
30
            'category' => 'Session storage'
31
        ];
32
        $testData = new TestData($input);
33
34
        $test = new TestCase\FileSystem\FreeSpace($testData);
35
        $testResult = $test->getTestResult();
36
37
        $this->addTestResult($testResult);
38
        $this->setTestResult($testResult);
39
    }
40
}
41