| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 13 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 16 | public function generateCode($placeHolders, $replacements, $templateName, $resultPath) | ||
| 17 |     { | ||
| 18 | $templatePath = CODE_TEMPLATE_PATH.'/'.$templateName; | ||
| 19 |         if (false === file_exists($templatePath)) { | ||
| 20 |             throw new \RunTimeException(sprintf('Not found template %s', $templatePath)); | ||
| 21 | } | ||
| 22 | |||
| 23 | $template = file_get_contents($templatePath); | ||
| 24 | |||
| 25 | $code = str_replace($placeHolders, $replacements, $template); | ||
| 26 | |||
| 27 | return file_put_contents($resultPath, $code); | ||
| 28 | } | ||
| 29 | |||
| 46 |