GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( fb3a62...ec23f8 )
by Orlando
01:04
created

KEY::decode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the cfdi-certificate project.
5
 *
6
 * (c) Kinedu
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Kinedu\CFDI\Certificate;
13
14
class KEY extends Certificate
15
{
16
    /** @var string */
17
    protected $keyFile;
18
19
    /** @var string */
20
    protected $password;
21
22
    /** @var string */
23
    public $decodeExtension = 'key.pem';
24
25
    public function __construct(string $keyFile, string $password)
26
    {
27
        $this->keyFile = $this->getOriginalRouteFile($keyFile);
28
29
        $this->password = $password;
30
    }
31
32
    public function decode(): string
33
    {
34
        return shell_exec(sprintf(
35
            "openssl pkcs8 -inform DER -in %s -passin pass:%s",
36
            $this->keyFile,
37
            $this->password
38
        ));
39
    }
40
}
41