Conditions | 5 |
Paths | 9 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
82 | public static function merge(PropertyMappingViewInterface ...$views): PropertyMappingView |
||
83 | { |
||
84 | $target = new PropertyMappingView(); |
||
85 | foreach ($views as $view) { |
||
86 | if ($view->getType()) { |
||
|
|||
87 | $target->setType($view->getType()); |
||
88 | } |
||
89 | if ($view->getTargetClass()) { |
||
90 | $target->setTargetClass($view->getTargetClass()); |
||
91 | } |
||
92 | foreach ($view->getParameters() as $parameter => $value) { |
||
93 | $target->setParameter($parameter, $value); |
||
94 | } |
||
95 | } |
||
96 | return $target; |
||
97 | } |
||
99 |
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: