AbstractTag::setReplacement()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
}