Completed
Push — master ( cefe8d...0ca202 )
by Andrii
03:36
created

AbstractParser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 11
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parsePath() 0 6 2
parseLines() 0 1 ?
1
<?php
2
/**
3
 * Changelog keeper
4
 *
5
 * @link      https://github.com/hiqdev/chkipper
6
 * @package   chkipper
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\chkipper\history;
12
13
/**
14
 * Abstract history parser.
15
 *
16
 * @author Andrii Vasyliev <[email protected]>
17
 */
18
abstract class AbstractParser extends Builder
19
{
20 3
    public function parsePath($path)
21
    {
22 3
        $lines = is_file($path) ? file($path) : [];
23
24 3
        return $this->parseLines($lines);
25
    }
26
27
    abstract public function parseLines(array $lines);
28
}
29