| @@ 238-272 (lines=35) @@ | ||
| 235 | $union_comparison_results |
|
| 236 | ); |
|
| 237 | ||
| 238 | if ($union_comparison_results->type_coerced) { |
|
| 239 | if ($union_comparison_results->type_coerced_from_mixed) { |
|
| 240 | if (IssueBuffer::accepts( |
|
| 241 | new MixedPropertyTypeCoercion( |
|
| 242 | $var_id . ' expects \'' . $class_property_type->getId() . '\', ' |
|
| 243 | . ' parent type `' . $assignment_value_type->getId() . '` provided', |
|
| 244 | new CodeLocation( |
|
| 245 | $statements_analyzer->getSource(), |
|
| 246 | $assignment_value ?: $stmt, |
|
| 247 | $context->include_location |
|
| 248 | ), |
|
| 249 | $property_id |
|
| 250 | ), |
|
| 251 | $statements_analyzer->getSuppressedIssues() |
|
| 252 | )) { |
|
| 253 | // keep soldiering on |
|
| 254 | } |
|
| 255 | } else { |
|
| 256 | if (IssueBuffer::accepts( |
|
| 257 | new PropertyTypeCoercion( |
|
| 258 | $var_id . ' expects \'' . $class_property_type->getId() . '\', ' |
|
| 259 | . ' parent type \'' . $assignment_value_type->getId() . '\' provided', |
|
| 260 | new CodeLocation( |
|
| 261 | $statements_analyzer->getSource(), |
|
| 262 | $assignment_value ?: $stmt, |
|
| 263 | $context->include_location |
|
| 264 | ), |
|
| 265 | $property_id |
|
| 266 | ), |
|
| 267 | $statements_analyzer->getSuppressedIssues() |
|
| 268 | )) { |
|
| 269 | // keep soldiering on |
|
| 270 | } |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||
| 274 | if ($union_comparison_results->to_string_cast) { |
|
| 275 | if (IssueBuffer::accepts( |
|
| @@ 934-968 (lines=35) @@ | ||
| 931 | } |
|
| 932 | } |
|
| 933 | ||
| 934 | if ($union_comparison_results->type_coerced) { |
|
| 935 | if ($union_comparison_results->type_coerced_from_mixed) { |
|
| 936 | if (IssueBuffer::accepts( |
|
| 937 | new MixedPropertyTypeCoercion( |
|
| 938 | $var_id . ' expects \'' . $class_property_type->getId() . '\', ' |
|
| 939 | . ' parent type `' . $assignment_value_type->getId() . '` provided', |
|
| 940 | new CodeLocation( |
|
| 941 | $statements_analyzer->getSource(), |
|
| 942 | $assignment_value ?: $stmt, |
|
| 943 | $context->include_location |
|
| 944 | ), |
|
| 945 | $property_ids[0] |
|
| 946 | ), |
|
| 947 | $statements_analyzer->getSuppressedIssues() |
|
| 948 | )) { |
|
| 949 | // keep soldiering on |
|
| 950 | } |
|
| 951 | } else { |
|
| 952 | if (IssueBuffer::accepts( |
|
| 953 | new PropertyTypeCoercion( |
|
| 954 | $var_id . ' expects \'' . $class_property_type->getId() . '\', ' |
|
| 955 | . ' parent type \'' . $assignment_value_type->getId() . '\' provided', |
|
| 956 | new CodeLocation( |
|
| 957 | $statements_analyzer->getSource(), |
|
| 958 | $assignment_value ?: $stmt, |
|
| 959 | $context->include_location |
|
| 960 | ), |
|
| 961 | $property_ids[0] |
|
| 962 | ), |
|
| 963 | $statements_analyzer->getSuppressedIssues() |
|
| 964 | )) { |
|
| 965 | // keep soldiering on |
|
| 966 | } |
|
| 967 | } |
|
| 968 | } |
|
| 969 | ||
| 970 | if ($union_comparison_results->to_string_cast) { |
|
| 971 | if (IssueBuffer::accepts( |
|