AbstractTag   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 31
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getArgs() 0 2 1
A setReplacement() 0 2 1
1
<?php
2
/**
3
 * {CLASS SUMMARY}
4
 *
5
 * Date: 7/27/18
6
 * Time: 11:14 PM
7
 * @author Michael Munger <[email protected]>
8
 */
9
10
namespace HPHIO\Farret;
11
12
13
abstract class AbstractTag
14
{
15
    protected $pattern;
16
    protected $tag;
17
    protected $args = [];
18
    protected $replacement = null;
19
    protected $this = null;
20
21
    const TAG  = 0;
22
    const HOOK = 1;
23
24 56
    public function __construct($pattern, $tag)
25
    {
26 56
        $this->pattern = $pattern;
27 56
        $this->tag = $tag;
28 56
        $this->setup();
29 56
    }
30
31 15
    public function getArgs() {
32 15
        return $this->args;
33
    }
34
35 4
    public function setReplacement($replacement) {
36 4
        $this->replacement = $replacement;
37 4
    }
38
39
    abstract public function getLabel();
40
    abstract public function setup();
41
    abstract public function fart($dictionary);
42
    abstract public function getTag();
43
    abstract public function getReplacement();
44
}