Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
16 | 5 | public function process($context) |
|
17 | { |
||
18 | 5 | $contents = $context->getContents(); |
|
19 | $contents = preg_replace_callback('/<\?=((?!\?>).)*\?>/s', function ($match) use ($context) { |
||
20 | 1 | return $context->getPlaceholderContainer()->createPlaceholder($match[0]); |
|
21 | 5 | }, $contents); |
|
22 | 5 | $contents = preg_replace_callback('/<\?php((?!\?>).)*(\?>)?/s', function ($match) use ($context) { |
|
23 | 1 | return $context->getPlaceholderContainer()->createPlaceholder($match[0]); |
|
24 | 5 | }, $contents); |
|
25 | |||
26 | 5 | return $context->setContents($contents); |
|
27 | } |
||
28 | } |
||
29 |