mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
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.
40 lines
829 B
PHP
40 lines
829 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\FqsenResolver;
|
|
|
|
final class CustomParam implements Tag
|
|
{
|
|
public $myParam;
|
|
public $fqsenResolver;
|
|
|
|
public function getName() : string
|
|
{
|
|
return 'spy';
|
|
}
|
|
|
|
public static function create($body, FqsenResolver $fqsenResolver = null, ?string $myParam = null)
|
|
{
|
|
$tag = new self();
|
|
$tag->fqsenResolver = $fqsenResolver;
|
|
$tag->myParam = $myParam;
|
|
|
|
return $tag;
|
|
}
|
|
|
|
public function render(?Formatter $formatter = null) : string
|
|
{
|
|
return $this->getName();
|
|
}
|
|
|
|
public function __toString() : string
|
|
{
|
|
return $this->getName();
|
|
}
|
|
}
|