| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function run() |
||
| 21 | { |
||
| 22 | $template = $this->getTemplate(); |
||
| 23 | foreach (glob(sprintf('%s*.php', $this->src_dir_path)) as $filename) { |
||
| 24 | $basename = basename($filename, '.php'); |
||
| 25 | |||
| 26 | if (preg_match('/(.*)(Bool|BoolNull)$/', $basename, $matches)) { |
||
| 27 | $class_name = $matches[0]; |
||
| 28 | $method_sub_name = $matches[1]; |
||
| 29 | $type = $matches[2]; |
||
|
|
|||
| 30 | |||
| 31 | $content = str_replace('AccountIdString', $class_name, $template); |
||
| 32 | $content = str_replace('AccountId', $method_sub_name, $content); |
||
| 33 | |||
| 34 | |||
| 35 | $test_file_path = str_replace('AccountIdStringTest', $class_name . 'Test', $this->template_path); |
||
| 36 | file_put_contents($test_file_path, $content); |
||
| 37 | } |
||
| 49 | $gen->run(); |