[BUGFIX] Implement Tag interface for DocBlock tags 61/65061/6
authorSimon Gilli <typo3@gilbertsoft.org>
Tue, 21 Jul 2020 08:59:42 +0000 (10:59 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 21 Jul 2020 11:34:53 +0000 (13:34 +0200)
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/+/65061
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/extbase/Classes/Reflection/DocBlock/Tags/Null_.php

index 5baae69..dc8d3eb 100644 (file)
@@ -17,14 +17,31 @@ declare(strict_types=1);
 
 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 '';
     }
 }