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