Conditions | 5 |
Paths | 5 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function goodFeatures() : iterable |
||
37 | { |
||
38 | foreach (new FilesystemIterator(__DIR__ . '/../../gherkin_testdata/good') as $file) { |
||
39 | |||
40 | if (in_array(preg_replace('/^.*\//', '', $file), $this->notSupported['good'])) { |
||
41 | continue; |
||
42 | } |
||
43 | |||
44 | if (!preg_match('/(?<stem>.*)[.]feature$/', $file, $matches)) { |
||
45 | continue; |
||
46 | } |
||
47 | |||
48 | if (in_array(preg_replace('/^.*\//', '', $matches['stem']), $this->notSupported['good'])) { |
||
49 | continue; |
||
50 | } |
||
51 | |||
52 | yield $matches['stem'] => [ |
||
53 | $matches['stem'] . '.feature', |
||
54 | $matches['stem'] . '.ast.ndjson' |
||
55 | ]; |
||
56 | } |
||
57 | } |
||
58 | } |
||
59 |
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.