Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | final class Service |
||
13 | { |
||
14 | private $definition; |
||
15 | private $constructor; |
||
16 | private $property; |
||
17 | private $method; |
||
18 | |||
19 | 12 | public function __construct(Definition $service, Constructor $constructor) |
|
20 | { |
||
21 | 12 | $this->definition = $service; |
|
22 | 12 | $this->constructor = $constructor; |
|
23 | 12 | $this->property = new PropertyName($service->name()); |
|
24 | 12 | $this->method = new MethodName($service->name()); |
|
25 | 12 | } |
|
26 | |||
27 | 7 | public function accessible(): bool |
|
28 | { |
||
29 | 7 | return $this->definition->exposed(); |
|
30 | } |
||
31 | |||
32 | 7 | public function name(): Name |
|
33 | { |
||
34 | 7 | return $this->definition->exposedAs(); |
|
35 | } |
||
36 | |||
37 | 7 | public function property(): PropertyName |
|
40 | } |
||
41 | |||
42 | 7 | public function method(): MethodName |
|
45 | } |
||
46 | |||
47 | 7 | public function __toString(): string |
|
59 |