Data::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 8
rs 10
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 openssl_x509_parse;
10
11
class Data extends \SimpleSAML\Module\monitor\TestCase\Cert
12
{
13
    /**
14
     * @param \SimpleSAML\Module\monitor\TestData $testData
15
     */
16
    public function __construct(TestData $testData)
17
    {
18
        $certData = $testData->getInputItem('certData');
19
20
        $certData = openssl_x509_parse($certData) ?: [];
21
        $testData->setInput($certData, 'certData');
22
23
        parent::__construct($testData);
24
    }
25
}
26