| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function generate($array, $skeleton) |
||
| 38 | { |
||
| 39 | $parts = explode('.', $this->file->getPathName()); |
||
|
|
|||
| 40 | array_pop($parts); |
||
| 41 | |||
| 42 | $file = implode('.', $parts) . '.yml'; |
||
| 43 | |||
| 44 | if (file_exists($file)) { |
||
| 45 | return; |
||
| 46 | } |
||
| 47 | |||
| 48 | $this->renderFile($skeleton, $file, array( |
||
| 49 | 'array' => $array, |
||
| 50 | )); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.