| Conditions | 4 |
| Paths | 5 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function provideAllCases() { |
||
| 18 | $cases = array(); |
||
| 19 | |||
| 20 | foreach (glob(__DIR__ . '/*', GLOB_ONLYDIR) as $dir) { |
||
| 21 | $path = realpath($dir); |
||
| 22 | $json = json_encode(json_decode(file_get_contents($path . '/expected.json'))); |
||
| 23 | |||
| 24 | $files = array(); |
||
| 25 | if (file_exists($path . '/source.php')) { |
||
| 26 | $files[] = $path . '/source.php'; |
||
| 27 | } |
||
| 28 | if (file_exists($path . '/source.txt')) { |
||
| 29 | $files[] = $path . '/source.txt'; |
||
| 30 | } |
||
| 31 | |||
| 32 | $cases[] = array( |
||
| 33 | basename($dir), |
||
| 34 | $files, |
||
| 35 | $json |
||
| 36 | ); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $cases; |
||
| 40 | } |
||
| 41 | |||
| 43 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.