Files   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A invokeTest() 0 13 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\monitor\TestSuite\Store;
6
7
use SimpleSAML\Module\monitor\State;
8
use SimpleSAML\Module\monitor\TestConfiguration;
9
use SimpleSAML\Module\monitor\TestCase;
10
use SimpleSAML\Module\monitor\TestData;
11
use SimpleSAML\Module\monitor\TestResult;
12
use SimpleSAML\Module\monitor\TestSuite\Store;
13
14
use function session_save_path;
15
16
final class Files extends \SimpleSAML\Module\monitor\TestSuiteFactory
17
{
18
    /**
19
     * @param \SimpleSAML\Module\monitor\TestConfiguration $configuration
20
     */
21
    public function __construct(TestConfiguration $configuration)
22
    {
23
        $this->setCategory('PHP sessions');
24
        parent::__construct($configuration);
25
    }
26
27
28
    /**
29
     * @return void
30
     */
31
    public function invokeTest(): void
32
    {
33
        $input = [
34
            'path' => session_save_path(),
35
            'category' => 'Session storage'
36
        ];
37
        $testData = new TestData($input);
38
39
        $test = new TestCase\FileSystem\FreeSpace($testData);
40
        $testResult = $test->getTestResult();
41
42
        $this->addTestResult($testResult);
43
        $this->setTestResult($testResult);
44
    }
45
}
46