| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function createFixersFromFiles(array $files) |
|
| 19 | { |
||
| 20 | 1 | $fixers = []; |
|
| 21 | 1 | foreach ($files as $file) { |
|
| 22 | 1 | $relativeNamespace = $file->getRelativePath(); |
|
|
|
|||
| 23 | 1 | $class = 'Symfony\\CS\\Fixer\\' . ($relativeNamespace ? $relativeNamespace . '\\' : '') . $file->getBasename('.php'); |
|
| 24 | 1 | $fixers[] = new $class; |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | return $fixers; |
|
| 28 | } |
||
| 29 | } |
||
| 30 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.