Files
barryvdh_ReflectionDocBlock/tests/unit/Assets/CustomServiceClass.php
T
Jaapio 02f9ed7a8f Remove deprecated code paths
Typed tags are no longer creatable via the create method. The
parsing has become to complex to handle per tag. This logic has been
moved into factories.
2025-12-23 21:51:08 +01:00

40 lines
887 B
PHP

<?php
declare(strict_types=1);
namespace phpDocumentor\Reflection\Assets;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
use phpDocumentor\Reflection\FqsenResolver;
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
final class CustomServiceClass implements Tag
{
public $formatter;
public function getName() : string
{
return 'spy';
}
public static function create($body, PassthroughFormatter $formatter = null)
{
$tag = new self();
$tag->formatter = $formatter;
return $tag;
}
public function render(?Formatter $formatter = null) : string
{
return $this->getName();
}
public function __toString() : string
{
return $this->getName();
}
}