Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | final class DefaultCodeFeederPart implements ArrayPartInterface |
||
14 | { |
||
15 | 2 | public function feed(string $key, array $data, ClassType $class, PhpNamespace $namespace): void |
|
22 | ); |
||
23 | 2 | } |
|
24 | |||
25 | 2 | private function getMethodName(string $key): string |
|
26 | { |
||
27 | 2 | if (strpos($key, '\\')) { |
|
28 | //get the last part |
||
29 | 2 | $parts = explode('\\', $key); |
|
30 | 2 | $key = end($parts); |
|
31 | } |
||
32 | 2 | return 'get' . (new UnderscoreToCamelCase())->filter($key) . 'Config'; |
|
|
|||
33 | } |
||
34 | |||
35 | 2 | public function matches(string $key): bool |
|
38 | } |
||
39 | |||
40 | 2 | public function getCalleeCode(string $key, array $data, PhpNamespace $namespace): PhpLiteral |
|
45 |