Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
62 | public static function merge(DocumentMappingViewInterface ...$mappings): DocumentMappingView |
||
63 | { |
||
64 | $target = new DocumentMappingView(); |
||
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 | } |
||
78 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: