Passed
Push — main ( 68e606...997043 )
by Thierry
02:29
created
src/Engine/Engine.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function registerHelper(string $tagPrefix, string $tagTarget, Closure $tagHelper): void
70 70
     {
71 71
         // Do not overwrite existing helpers.
72
-        if(isset($this->helpers[$tagTarget]) && !isset($this->helpers[$tagTarget][$tagPrefix])) {
72
+        if (isset($this->helpers[$tagTarget]) && !isset($this->helpers[$tagTarget][$tagPrefix])) {
73 73
             $this->helpers[$tagTarget][$tagPrefix] = $tagHelper;
74 74
         }
75 75
     }
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @return HtmlComponent|Element
92 92
      */
93
-    public function callBuilderHelper(string $method, array $arguments): HtmlComponent|Element
93
+    public function callBuilderHelper(string $method, array $arguments): HtmlComponent | Element
94 94
     {
95 95
         $tagName = $this->getTagName($method);
96
-        foreach($this->helpers[self::TARGET_BUILDER] as $tagPrefix => $helper) {
96
+        foreach ($this->helpers[self::TARGET_BUILDER] as $tagPrefix => $helper) {
97 97
             if (stripos($tagName, "$tagPrefix-") === 0) {
98 98
                 $tagName = substr($tagName, strlen($tagPrefix) + 1);
99 99
                 return $helper($tagName, $method, $arguments);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function callComponentHelper(HtmlComponent $component, string $method, array $arguments): HtmlComponent
115 115
     {
116 116
         $tagName = $this->getTagName($method);
117
-        foreach($this->helpers[self::TARGET_COMPONENT] as $tagPrefix => $helper) {
117
+        foreach ($this->helpers[self::TARGET_COMPONENT] as $tagPrefix => $helper) {
118 118
             if (stripos($tagName, "$tagPrefix-") === 0) {
119 119
                 $tagName = substr($tagName, strlen($tagPrefix) + 1);
120 120
                 return $helper($component, $tagName, $method, $arguments);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function callElementHelper(HtmlElement $element, string $method, array $arguments): HtmlElement
136 136
     {
137 137
         $tagName = $this->getTagName($method);
138
-        foreach($this->helpers[self::TARGET_ELEMENT] as $tagPrefix => $helper) {
138
+        foreach ($this->helpers[self::TARGET_ELEMENT] as $tagPrefix => $helper) {
139 139
             if (stripos($tagName, "$tagPrefix-") === 0) {
140 140
                 $tagName = substr($tagName, strlen($tagPrefix) + 1);
141 141
                 return $helper($element, $tagName, $method, $arguments);
Please login to merge, or discard this patch.