Total Complexity | 4 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class ModifyTag implements TagInterface, ProxyTagInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var TagInterface |
||
16 | */ |
||
17 | protected $tag; |
||
18 | |||
19 | /** |
||
20 | * @var callable |
||
21 | */ |
||
22 | protected $logic; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * Class constructor. |
||
27 | * |
||
28 | * @param TagInterface $tag |
||
29 | * @param callable $logic |
||
30 | */ |
||
31 | 3 | public function __construct(TagInterface $tag, callable $logic) |
|
32 | { |
||
33 | 3 | $this->tag = $tag; |
|
34 | 3 | $this->logic = $logic; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * Get the tag name |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function getName(): string |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get the wrapped tag. |
||
49 | * |
||
50 | * @return TagInterface |
||
51 | */ |
||
52 | 1 | public function getTag(): TagInterface |
|
53 | { |
||
54 | 1 | return $this->tag; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Process an notation. |
||
59 | * |
||
60 | * @param array $notations |
||
61 | * @param string $value |
||
62 | * @return array |
||
63 | */ |
||
64 | 1 | public function process(array $notations, string $value): array |
|
70 | } |
||
71 | } |
||
72 |