File   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\monitor\TestCase\Cert;
6
7
use SimpleSAML\Module\monitor\TestData;
8
9
use function file_get_contents;
10
11
final class File extends Data
12
{
13
    /**
14
     * @param \SimpleSAML\Module\monitor\TestData $testData
15
     */
16
    public function __construct(TestData $testData)
17
    {
18
        $certFile = $testData->getInputItem('certFile');
19
        $certData = @file_get_contents($certFile);
0 ignored issues
show
Bug introduced by
It seems like $certFile can also be of type null; however, parameter $filename of file_get_contents() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
        $certData = @file_get_contents(/** @scrutinizer ignore-type */ $certFile);
Loading history...
20
        $testData->setInput($certData, 'certData');
21
22
        parent::__construct($testData);
23
    }
24
}
25