Files
DesignPatternsPHP/Structural/Composite/TextElement.php
Dominik Liebler 4678b5d86f PHP8
2021-04-12 14:04:45 +02:00

16 lines
268 B
PHP

<?php declare(strict_types=1);
namespace DesignPatterns\Structural\Composite;
class TextElement implements Renderable
{
public function __construct(private string $text)
{
}
public function render(): string
{
return $this->text;
}
}