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 ( 0f2b67...efb36a )
by Ramy
04:57
created

Output   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 2
c 4
b 1
f 0
lcom 1
cbo 0
dl 0
loc 35
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A parse() 0 7 1
generate() 0 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