mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-11 17:34:09 +02:00
PHP7 Composite
This commit is contained in:
@@ -2,17 +2,10 @@
|
||||
|
||||
namespace DesignPatterns\Structural\Composite;
|
||||
|
||||
class InputElement extends FormElement
|
||||
class InputElement implements RenderableInterface
|
||||
{
|
||||
/**
|
||||
* renders the input element HTML.
|
||||
*
|
||||
* @param int $indent
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function render($indent = 0)
|
||||
public function render(): string
|
||||
{
|
||||
return str_repeat(' ', $indent).'<input type="text" />';
|
||||
return '<input type="text" />';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user