Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public static function assertFieldNames($context, $expected, $fields) |
||
17 | { |
||
18 | $actual = array(); |
||
19 | foreach ($fields as $field) { |
||
20 | if (get_class($field) == 'FieldGroup') { |
||
21 | array_push($actual, $field->Name()); |
||
22 | } else { |
||
23 | array_push($actual, $field->getName()); |
||
24 | } |
||
25 | } |
||
26 | $context->assertEquals($expected, $actual); |
||
27 | } |
||
28 | } |
||
29 |
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.