Test Setup Failed
Branch master (183045)
by Michael
02:10
created

AbstractTag   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 30
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
20
    const TAG  = 0;
21
    const HOOK = 1;
22
23
    public function __construct($pattern, $tag)
24
    {
25
        $this->pattern = $pattern;
26
        $this->tag = $tag;
27
        $this->setup();
28
    }
29
30
    public function getArgs() {
31
        return $this->args;
32
    }
33
34
    public function setReplacement($replacement) {
35
        $this->replacement = $replacement;
36
    }
37
38
    abstract function getLabel();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
39
    abstract function setup();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
40
    abstract function fart($dictionary);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
41
    abstract function getTag();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
42
    abstract function getReplacement();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
43
}