Parser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 32
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
apply() 0 1 ?
A __construct() 0 5 1
1
<?php
2
3
namespace League\CLImate\Decorator\Parser;
4
5
use League\CLImate\Decorator\Tags;
6
7
abstract class Parser
8
{
9
    /**
10
     * An array of the currently applied codes
11
     *
12
     * @var array $current;
13
     */
14
    protected $current = [];
15
16
    /**
17
     * An array of the tags that should be searched for
18
     * and their corresponding replacements
19
     *
20
     * @var \League\CLImate\Decorator\Tags $tags
21
     */
22
    public $tags;
23
24 580
    public function __construct(array $current, Tags $tags)
25
    {
26 580
        $this->current = $current;
27 580
        $this->tags    = $tags;
28 580
    }
29
30
    /**
31
     * Wrap the string in the current style
32
     *
33
     * @param  string $str
34
     *
35
     * @return string
36
     */
37
    abstract public function apply($str);
38
}
39