PHP7 Composite

This commit is contained in:
Dominik Liebler
2016-09-22 20:44:28 +02:00
parent 72f32359c6
commit 320dc3c6bf
7 changed files with 41 additions and 63 deletions

View File

@@ -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" />';
}
}