From ef555ae9d4451c8ab42b412babc0c1c89df9156b Mon Sep 17 00:00:00 2001 From: Simon Gilli Date: Tue, 21 Jul 2020 10:59:42 +0200 Subject: [PATCH] [BUGFIX] Implement Tag interface for DocBlock tags Since phpdocumentor/reflection-docbloc 5.2.x a tag is required to implement also the phpDocumentor\Reflection\DocBlock\Tags\Formatter\Tag interface. This patch implements the tag interface for the Null_ tag defined in Extbase. Resolves: #91832 Releases: master, 10.4 Change-Id: Idb836dc3f8816a5c2c40d429a61dcda1cd27fd7f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65025 Tested-by: TYPO3com Tested-by: Simon Gilli Tested-by: Benni Mack Reviewed-by: Simon Gilli Reviewed-by: Benni Mack --- .../Reflection/DocBlock/Tags/Null_.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/extbase/Classes/Reflection/DocBlock/Tags/Null_.php b/typo3/sysext/extbase/Classes/Reflection/DocBlock/Tags/Null_.php index 5baae69aece3..dc8d3eba6d52 100644 --- a/typo3/sysext/extbase/Classes/Reflection/DocBlock/Tags/Null_.php +++ b/typo3/sysext/extbase/Classes/Reflection/DocBlock/Tags/Null_.php @@ -17,14 +17,31 @@ namespace TYPO3\CMS\Extbase\Reflection\DocBlock\Tags; +use phpDocumentor\Reflection\DocBlock\Tag; use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod; +use phpDocumentor\Reflection\DocBlock\Tags\Formatter; /** * Class TYPO3\CMS\Extbase\Reflection\DocBlock\Tags\Null_ */ -class Null_ implements StaticMethod +class Null_ implements Tag, StaticMethod { - public static function create($body) + public function getName(): string { + return 'Null'; + } + + public static function create($body): void + { + } + + public function render(?Formatter $formatter = null): string + { + return ''; + } + + public function __toString(): string + { + return ''; } }