| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 51 | protected function fillTemplate(string $template, array $data, Model $m): string |
||
| 52 | { |
||
| 53 | foreach ($data as $name => $value) { |
||
| 54 | $template = str_replace( |
||
| 55 | '{{' . $name . '}}', |
||
| 56 | $value, |
||
| 57 | $template |
||
| 58 | ); |
||
| 59 | } |
||
| 60 | |||
| 61 | $template = str_replace( |
||
| 62 | '{{modelName}}', |
||
| 63 | $m->getName(), |
||
| 64 | $template |
||
| 65 | ); |
||
| 66 | $template = str_replace( |
||
| 67 | '{{modelNameLower}}', |
||
| 68 | mb_strtolower($m->getName()), |
||
| 69 | $template |
||
| 70 | ); |
||
| 71 | return $template; |
||
| 72 | } |
||
| 74 |