From 9046f066dfb5d7e8d0e605f2f6466b738c5c58c5 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 4 Nov 2018 13:27:23 +0000 Subject: [PATCH] Html/Component -> Html/Renderable --- src/Html/{Component.php => Renderable.php} | 2 +- src/Html/{Components => Renderables}/Element.php | 12 ++++++------ src/Html/{Components => Renderables}/Text.php | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) rename src/Html/{Component.php => Renderable.php} (83%) rename src/Html/{Components => Renderables}/Element.php (89%) rename src/Html/{Components => Renderables}/Text.php (75%) diff --git a/src/Html/Component.php b/src/Html/Renderable.php similarity index 83% rename from src/Html/Component.php rename to src/Html/Renderable.php index ff9a8b9..033e878 100644 --- a/src/Html/Component.php +++ b/src/Html/Renderable.php @@ -2,7 +2,7 @@ namespace Erusev\Parsedown\Html; -interface Component +interface Renderable { public function getHtml(): string; } diff --git a/src/Html/Components/Element.php b/src/Html/Renderables/Element.php similarity index 89% rename from src/Html/Components/Element.php rename to src/Html/Renderables/Element.php index 732bb64..bc5f673 100644 --- a/src/Html/Components/Element.php +++ b/src/Html/Renderables/Element.php @@ -1,12 +1,12 @@ */ private $attributes; - /** @var Component[]|null */ + /** @var Renderable[]|null */ private $Contents; /** * @param string $name * @param array $attributes - * @param Component[]|null $Contents + * @param Renderable[]|null $Contents */ public function __construct( string $name, @@ -55,7 +55,7 @@ final class Element implements Component } /** - * @return Component[]|null + * @return Renderable[]|null */ public function contents(): ?array { diff --git a/src/Html/Components/Text.php b/src/Html/Renderables/Text.php similarity index 75% rename from src/Html/Components/Text.php rename to src/Html/Renderables/Text.php index 1737cf2..dce98f7 100644 --- a/src/Html/Components/Text.php +++ b/src/Html/Renderables/Text.php @@ -1,12 +1,12 @@