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