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.

Output::parse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Talal\Exporter\Output;
4
5
abstract class Output
6
{
7
    /**
8
     * @var array
9
     */
10
    protected $keys = [];
11
12
    /**
13
     * @var array
14
     */
15
    protected $values = [];
16
17
    /**
18
     * @param string $fileContents
19
     */
20 15
    public function __construct($fileContents)
21
    {
22 15
        $this->parse($fileContents);
23 15
    }
24
25 15
    public function parse($fileContents)
26
    {
27 15
        preg_match_all('/(\w+)="?(.*)(?<!")/', $fileContents, $matches);
28
29 15
        $this->keys = $matches[1];
30 15
        $this->values = $matches[2];
31 15
    }
32
33
    /**
34
     * Generate a capable web server format.
35
     *
36
     * @return string
37
     */
38
    abstract public function generate();
39
}
40