Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 83.33% |
Changes | 0 |
1 | <?php |
||
5 | class Buttons extends Tag |
||
6 | { |
||
7 | 2 | public function __construct() |
|
8 | { |
||
9 | 2 | $this->btnDefault(); |
|
10 | 2 | $this->btnCustom(); |
|
11 | 2 | } |
|
12 | |||
13 | 2 | private function btnDefault() |
|
14 | { |
||
15 | 2 | $regex = "/{(\s?)+btn(\s?)+}(.*?){(\s?)+\/btn(\s?)+}/is"; |
|
16 | |||
17 | Tag::match($regex, function($value = "") { |
||
18 | |||
19 | Tag::replace("<button class=\"btn\">$value</button>"); |
||
20 | 2 | }); |
|
21 | 2 | } |
|
22 | |||
23 | 2 | private function btnCustom() |
|
30 | 2 | }); |
|
31 | 2 | } |
|
32 | } |
||
33 |