mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-13 10:24:00 +02:00
PHP8
This commit is contained in:
@@ -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