Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
15 | 4 | public function feed(string $key, array $data, ClassType $class, PhpNamespace $namespace): void |
|
16 | { |
||
17 | 4 | $class->addMethod($this->getMethodName($key)) |
|
18 | 4 | ->setVisibility(ClassType::VISIBILITY_PRIVATE) |
|
19 | 4 | ->setReturnType('array') |
|
20 | 4 | ->setBody( |
|
21 | 4 | sprintf('return %s;', (new NsArrayPrinter($namespace))->printArray($data, 1, '')) |
|
22 | ); |
||
40 |