| Conditions | 4 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | public static function merge(ClassMappingViewInterface ...$mappings): ClassMappingView |
||
| 63 | { |
||
| 64 | $target = new ClassMappingView(); |
||
| 65 | $parameters = []; |
||
| 66 | foreach ($mappings as $mapping) { |
||
| 67 | if ($mapping->getType()) { |
||
|
|
|||
| 68 | $target->setType($mapping->getType()); |
||
| 69 | } |
||
| 70 | foreach ($mapping->getParameters() as $parameter => $value) { |
||
| 71 | $parameters[$parameter] = $value; |
||
| 72 | } |
||
| 73 | } |
||
| 74 | $target->setParameters($parameters); |
||
| 75 | return $target; |
||
| 76 | } |
||
| 83 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: