| Conditions | 4 |
| Paths | 6 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function info(array $paths, $options = ['format' => 'tsv']) |
||
|
|
|||
| 23 | { |
||
| 24 | if (empty($paths)) { |
||
| 25 | $paths[] = getcwd(); |
||
| 26 | } |
||
| 27 | |||
| 28 | $version_tool = new VersionTool(); |
||
| 29 | |||
| 30 | $result = []; |
||
| 31 | foreach ($paths as $path) { |
||
| 32 | $info = $version_tool->info($path); |
||
| 33 | |||
| 34 | if (!$info) { |
||
| 35 | throw new \Exception('Could not identify any application at path ' . $path); |
||
| 36 | } |
||
| 37 | |||
| 38 | $data = [ |
||
| 39 | 'application' => $info->application(), |
||
| 40 | 'version' => $info->version(), |
||
| 41 | 'project-root' => $info->projectRoot(), |
||
| 42 | 'document-root' => $info->documentRoot(), |
||
| 43 | ]; |
||
| 44 | $result[] = $data; |
||
| 45 | } |
||
| 46 | |||
| 47 | return new RowsOfFields($result); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.