Completed
Push — master ( 808823...246322 )
by Andrii
02:33
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 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 11
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
/*
4
 * Changelog keeper
5
 *
6
 * @link      https://github.com/hiqdev/chkipper
7
 * @package   chkipper
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\chkipper\history;
13
14
use UnexpectedValueException;
15
16
/**
17
 * Abstract history parser.
18
 *
19
 * @author Andrii Vasyliev <[email protected]>
20
 */
21 2
abstract class AbstractParser extends Builder
22
{
23 2
    public function parsePath($path)
24
    {
25 2
        $lines = is_file($path) ? file($path) : [];
26
27
        return $this->parseLines($lines);
28
    }
29
30
    abstract public function parseLines(array $lines);
31
}
32
33