@@ -740,7 +740,6 @@ public function handleBinding(string $value, string $name, ?DOMElement $node = n
740
740
$ element = trim ($ element );
741
741
if (preg_match ('/^`(.*)`$/ ' , $ element , $ match )) {
742
742
$ dynamicValues [] = $ this ->handleTemplateStringBinding ($ match [1 ], $ twigOutput );
743
- // $dynamicValues[] = '{{ ' . str_replace('"', '\'', $this->refactorTemplateString($element)) . ' }}';
744
743
} elseif (preg_match ('/^\{(.*)\}$/ ' , $ element , $ match )) {
745
744
$ this ->handleObjectBinding ([$ match [1 ]], $ dynamicValues , $ twigOutput );
746
745
} else {
@@ -772,13 +771,11 @@ public function handleBinding(string $value, string $name, ?DOMElement $node = n
772
771
/**
773
772
* @param string[] $items
774
773
* @param string[] $dynamicValues
775
-
776
774
* @throws ReflectionException
777
775
*/
778
776
protected function handleObjectBinding (array $ items , array &$ dynamicValues , bool $ twigOutput ): void
779
777
{
780
778
$ regexObjectElements = '/[" \']?(?<class>[^" \']+)[" \']?\s*:\s*(?<condition>[^,]+)/x ' ;
781
-
782
779
foreach ($ items as $ item ) {
783
780
if (preg_match ($ regexObjectElements , $ item , $ matchElement )) {
784
781
$ dynamicValues [] = $ this ->builder ->prepareBindingOutput (
@@ -789,6 +786,9 @@ protected function handleObjectBinding(array $items, array &$dynamicValues, bool
789
786
}
790
787
}
791
788
789
+ /**
790
+ * @throws ReflectionException
791
+ */
792
792
protected function handleTemplateStringBinding (string $ templateStringContent , bool $ twigOutput ): string
793
793
{
794
794
preg_match_all ('/\${([^}]+)}/ ' , $ templateStringContent , $ matches , PREG_SET_ORDER );
0 commit comments