| Conditions | 2 | 
| Paths | 1 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 32 | public function getFunctions(): array | ||
| 33 |     { | ||
| 34 | return [ | ||
| 35 | new TwigFunction( | ||
| 36 | 'sylius_test_form_attribute', | ||
| 37 |                 function (string $name, ?string $value = null): array { | ||
| 38 |                     if (strpos($this->env, 'test') === 0) { | ||
| 39 | return ['attr' => ['data-test-'.$name => (string) $value]]; | ||
| 40 | } | ||
| 41 | |||
| 42 | return []; | ||
| 43 | }, | ||
| 44 | ['is_safe' => ['html']] | ||
| 45 | ), | ||
| 46 | ]; | ||
| 47 | } | ||
| 48 | } | ||
| 49 |