mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-13 18:34:06 +02:00
PHP8
This commit is contained in:
@@ -27,9 +27,7 @@ class Form implements Renderable
|
||||
$formCode .= $element->render();
|
||||
}
|
||||
|
||||
$formCode .= '</form>';
|
||||
|
||||
return $formCode;
|
||||
return $formCode . '</form>';
|
||||
}
|
||||
|
||||
public function addElement(Renderable $element)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user