We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0a9d5c commit 3e5002cCopy full SHA for 3e5002c
src/Compiler.php
@@ -110,8 +110,6 @@ class Compiler
110
*/
111
protected $attributesWithIf = ['checked', 'selected', 'disabled'];
112
113
-
114
115
/**
116
* Compiler constructor.
117
@@ -233,9 +231,7 @@ private function handleTwigConfig(string $twigConfig): void
233
231
$config = parse_ini_string($twigConfig);
234
232
if ($config['attributes-with-if'] ?? false) {
235
$attributes = explode(',', $config['attributes-with-if']);
236
- foreach ($attributes as &$attribute) {
237
- $attribute = trim($attribute);
238
- }
+ $attributes = array_map(function ($item) { return trim($item); }, $attributes);
239
$this->attributesWithIf = array_merge($this->attributesWithIf, $attributes);
240
}
241
0 commit comments