| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | private function replaceTag(): void |
||
| 43 | 4 | { |
|
| 44 | foreach ($this->blocks as $key => $value) { |
||
| 45 | 2 | $pattern = '/{\s?block \'?"?' . $key . '"?\'?\s?}(.*?){\s?\/block\s?}/is'; |
|
| 46 | self::$content = preg_replace($pattern, $value, self::$content); |
||
| 47 | 2 | } |
|
| 48 | 2 | ||
| 49 | 2 | self::$content = preg_replace('/{\s?block \'?"?[\w]+"?\'?\s?}/is', '', self::$content); |
|
| 50 | self::$content = preg_replace('/{\s?\/block\s?}/is', '', self::$content); |
||
| 51 | } |
||
| 60 |