ParserResults::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 9
nc 1
nop 4
1
<?php
2
3
namespace Jalle19\CertificateParser;
4
5
use AcmePhp\Ssl\ParsedCertificate;
6
7
/**
8
 * Class ParserResults
9
 * @package Jalle19\CertificateParser
10
 */
11
class ParserResults
12
{
13
14
    /**
15
     * @var ParsedCertificate
16
     */
17
    private $parsedCertificate;
18
19
    /**
20
     * @var array
21
     */
22
    private $rawCertificate;
23
24
    /**
25
     * @var string
26
     */
27
    private $pemString;
28
29
    /**
30
     * @var string the certificate fingerprint
31
     */
32
    private $fingerprint;
33
34
35
    /**
36
     * ParserResult constructor.
37
     *
38
     * @param ParsedCertificate $parsedCertificate
39
     * @param array             $rawCertificate
40
     * @param string            $pemString
41
     * @param string            $fingerprint
42
     */
43
    public function __construct(
44
        ParsedCertificate $parsedCertificate,
45
        array $rawCertificate,
46
        $pemString,
47
        $fingerprint
48
    ) {
49
        $this->parsedCertificate = $parsedCertificate;
50
        $this->rawCertificate    = $rawCertificate;
51
        $this->pemString         = $pemString;
52
        $this->fingerprint       = $fingerprint;
53
    }
54
55
56
    /**
57
     * @return ParsedCertificate
58
     */
59
    public function getParsedCertificate()
60
    {
61
        return $this->parsedCertificate;
62
    }
63
64
65
    /**
66
     * @return array
67
     */
68
    public function getRawCertificate()
69
    {
70
        return $this->rawCertificate;
71
    }
72
73
74
    /**
75
     * @return string
76
     */
77
    public function getPemString()
78
    {
79
        return $this->pemString;
80
    }
81
82
    
83
    /**
84
     * @return string
85
     */
86
    public function getFingerprint()
87
    {
88
        return $this->fingerprint;
89
    }
90
91
}
92