Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
37 | 4 | public function exposed(): string |
|
38 | { |
||
39 | return (string) $this |
||
40 | 4 | ->services |
|
41 | 4 | ->exposed() |
|
42 | 4 | ->keys() |
|
43 | 4 | ->reduce( |
|
44 | 4 | new Sequence, |
|
45 | 4 | function(Sequence $methods, Name $service): Sequence { |
|
46 | 4 | $method = new MethodName($this->name->add($service)); |
|
47 | |||
48 | 4 | return $methods->add(<<<PHP |
|
49 | 4 | private function $method() |
|
50 | { |
||
51 | 4 | return \$this->{$this->name}->get('$service'); |
|
52 | } |
||
53 | PHP |
||
54 | ); |
||
55 | 4 | } |
|
56 | ) |
||
57 | 4 | ->join("\n\n"); |
|
58 | } |
||
89 |