| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function generate($moduleName) |
||
| 35 | { |
||
| 36 | if ($this->moduleFileExists($moduleName)) { |
||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | $values = array( |
||
| 41 | '%module_name%' => $moduleName, |
||
| 42 | '%code_pool%' => $this->codePool, |
||
| 43 | ); |
||
| 44 | |||
| 45 | if (!$this->fileSystem->pathExists($this->path)) { |
||
| 46 | $this->fileSystem->makeDirectory($this->path); |
||
| 47 | } |
||
| 48 | |||
| 49 | $this->fileSystem->putFileContents( |
||
| 50 | $this->getFilePath($moduleName), |
||
| 51 | strtr(file_get_contents(__DIR__ . '/templates/module.template'), $values) |
||
| 52 | ); |
||
| 53 | } |
||
| 54 | |||
| 65 |