@@ -26,7 +26,7 @@ |
||
| 26 | 26 | public function __construct() |
| 27 | 27 | { |
| 28 | 28 | $this->builder = new HtmlBuilder(); |
| 29 | - $this->builder->addElementBuilder('form', function(Element|null $element, |
|
| 29 | + $this->builder->addElementBuilder('form', function(Element | null $element, |
|
| 30 | 30 | string $tagName, string $method, array $arguments) { |
| 31 | 31 | return $this->createFormElement($tagName, $arguments); |
| 32 | 32 | }); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct() |
| 26 | 26 | { |
| 27 | - $this->addElementBuilder('set', function(Element|null $element, |
|
| 27 | + $this->addElementBuilder('set', function(Element | null $element, |
|
| 28 | 28 | string $tagName, string $method, array $arguments) { |
| 29 | 29 | if ($element === null) { |
| 30 | 30 | throw new LogicException('Attributes can be set for elements only'); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public function addElementBuilder(string $tagPrefix, Closure $elementBuilder) |
| 58 | 58 | { |
| 59 | 59 | // Do not overwrite existing builders. |
| 60 | - if(!isset($this->elementBuilders[$tagPrefix])) |
|
| 60 | + if (!isset($this->elementBuilders[$tagPrefix])) |
|
| 61 | 61 | { |
| 62 | 62 | $this->elementBuilders[$tagPrefix] = $elementBuilder; |
| 63 | 63 | } |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | * @return ElementInterface |
| 72 | 72 | * @throws LogicException When element is not initialized yet |
| 73 | 73 | */ |
| 74 | - public function make(string $method, array $arguments, Element|null $element = null): ElementInterface |
|
| 74 | + public function make(string $method, array $arguments, Element | null $element = null): ElementInterface |
|
| 75 | 75 | { |
| 76 | 76 | $tagName = strtolower(preg_replace('/(?<!^)([A-Z])/', '-$1', $method)); |
| 77 | - foreach($this->elementBuilders as $tagPrefix => $elementBuilder) |
|
| 77 | + foreach ($this->elementBuilders as $tagPrefix => $elementBuilder) |
|
| 78 | 78 | { |
| 79 | 79 | if (stripos($tagName, "$tagPrefix-") === 0) { |
| 80 | 80 | $tagName = substr($tagName, strlen($tagPrefix) + 1); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | * @param bool $condition |
| 15 | 15 | * @param Closure|AbstractElement $element |
| 16 | 16 | */ |
| 17 | - public function __construct(bool $condition, Closure|AbstractElement $element) |
|
| 17 | + public function __construct(bool $condition, Closure | AbstractElement $element) |
|
| 18 | 18 | { |
| 19 | 19 | if (!$condition) { |
| 20 | 20 | return; |