From fbc70cb834aead3ed5aea688934a0e1e5b58de0d Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sat, 30 Dec 2023 18:41:20 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- src/sys/content.php | 8 ++------ tests/sys/impl/ATag.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/sys/content.php b/src/sys/content.php index 44e21fc..93a5cd0 100644 --- a/src/sys/content.php +++ b/src/sys/content.php @@ -7,12 +7,8 @@ use nulib\cl; * Class content: gestionnaire de contenu (statique ou dynamique) */ class content { - /** - * quoter $vs si c'est un scalaire. sinon retourner le tableau tel quel - * - * NB: cette méthode est accessible via la fonction globale {@link q()} - */ - static final function q($contents): iterable { + /** quoter $vs si c'est un scalaire. sinon retourner le tableau tel quel */ + static final function quote($contents): iterable { if ($contents === null || $contents === false) return []; elseif ($contents instanceof IContent) return [$contents]; elseif ($contents instanceof IPrintable) return [$contents]; diff --git a/tests/sys/impl/ATag.php b/tests/sys/impl/ATag.php index 5be5bac..feef0d9 100644 --- a/tests/sys/impl/ATag.php +++ b/tests/sys/impl/ATag.php @@ -16,7 +16,7 @@ class ATag implements IStaticContent { function getContent(): iterable { return [ "<$this->tag>", - ...content::q($this->contents), + ...content::quote($this->contents), "tag>", ]; }