Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
9 | public function generate(array $fieldDefinitions = array(), $clsName, $path) |
||
10 | { |
||
11 | $fileName = str_replace('\\', '/', $clsName).'.php'; |
||
12 | $file = $path.'/'.$fileName; |
||
13 | |||
14 | $clsToken = explode('\\', $clsName); |
||
15 | $class = array_pop($clsToken); |
||
16 | $namespace = implode('\\', $clsToken); |
||
17 | |||
18 | $parameters = array( |
||
19 | 'namespace' => $namespace, |
||
20 | 'class' => $class, |
||
21 | 'field_definitions' => $fieldDefinitions, |
||
22 | ); |
||
23 | |||
24 | $this->renderFile('ValueObject.php.twig', $file, $parameters); |
||
25 | |||
26 | return $file; |
||
27 | } |
||
28 | } |
||
29 |