Completed
Push — master ( da1c4e...70745c )
by Jaap
06:01
created

CustomServiceClass   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 27
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A create() 0 7 1
A render() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace phpDocumentor\Reflection\Assets;
6
7
use phpDocumentor\Reflection\DocBlock\Tag;
8
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
9
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
10
use phpDocumentor\Reflection\FqsenResolver;
11
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
12
13
final class CustomServiceClass implements Tag, StaticMethod
14
{
15
    public $formatter;
16
17
    public function getName() : string
18
    {
19
        return 'spy';
20
    }
21
22
    public static function create($body, PassthroughFormatter $formatter = null)
23
    {
24
        $tag = new self();
25
        $tag->formatter = $formatter;
26
27
        return $tag;
28
    }
29
30
    public function render(?Formatter $formatter = null) : string
31
    {
32
        return $this->getName();
33
    }
34
35
    public function __toString() : string
36
    {
37
        return $this->getName();
38
    }
39
}
40