This commit is contained in:
Dominik Liebler
2021-04-12 14:04:45 +02:00
parent 5c5d453506
commit 4678b5d86f
50 changed files with 992 additions and 1430 deletions

View File

@@ -27,9 +27,7 @@ class Form implements Renderable
$formCode .= $element->render();
}
$formCode .= '</form>';
return $formCode;
return $formCode . '</form>';
}
public function addElement(Renderable $element)

View File

@@ -4,11 +4,8 @@ namespace DesignPatterns\Structural\Composite;
class TextElement implements Renderable
{
private string $text;
public function __construct(string $text)
public function __construct(private string $text)
{
$this->text = $text;
}
public function render(): string