Conditions | 2 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 3.4578 |
Changes | 0 |
1 | <?php |
||
13 | 2 | private function getBlockContent(): void |
|
14 | { |
||
15 | 2 | $search = "/{(\s?)+extends.*}.*{(\s?)+([\w]+)(\s?)+}/is"; |
|
16 | |||
17 | Tag::match($search, function($blockName) { |
||
18 | |||
19 | $search = "/{(\s?)+$blockName(\s?)+}(.*?){(\s?)+\/$blockName(\s?)+}/is"; |
||
20 | |||
21 | Tag::match($search, function($content) use ($blockName) { |
||
22 | |||
23 | if (!array_key_exists($blockName, Tag::$blocks)) { |
||
24 | Tag::$blocks[$blockName] = $content; |
||
25 | } |
||
26 | |||
27 | Tag::replace(''); |
||
28 | |||
29 | $this->getBlockContent(); |
||
30 | }); |
||
50 |