forked from phpDocumentor/ReflectionDocBlock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomServiceClass.php
More file actions
38 lines (29 loc) · 817 Bytes
/
CustomServiceClass.php
File metadata and controls
38 lines (29 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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;
final class CustomServiceClass implements Tag
{
/** @var Formatter|null */
public $formatter;
public function getName() : string
{
return 'spy';
}
public static function create(string $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();
}
}