| Conditions | 1 |
| Paths | 1 |
| Total Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function fixAttributes(SourceEvent $event) |
||
| 38 | { |
||
| 39 | 484 | $event->setTemplate(preg_replace_callback('/ __attr__="(__a[0-9a-f]+)"/', function ($mch) { |
|
| 40 | 13 | return '{% for ____ak,____av in ' . $mch[1] . ' %}{% if (____av|length > 0) and not (____av|length == 1 and ____av[0] is same as(false)) %} {{____ak|raw}}{% if ____av|length > 1 or ____av[0] is not same as(true) %}="{{ ____av|join(\'\') }}"{% endif %}{% endif %}{% endfor %}'; |
|
| 41 | 484 | }, $event->getTemplate())); |
|
| 42 | 484 | } |
|
| 43 | } |
||
| 44 |