Skip to content

Commit

Permalink
simplify no longer necessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 2, 2024
1 parent d6f8165 commit 23e5e3f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Type/ObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -1384,12 +1384,7 @@ public function changeSubtractedType(?Type $subtractedType): Type
$subtractedSubTypes = [];

$subtractedTypesList = TypeUtils::flattenTypes($subtractedType);
$subtractedTypes = [];
foreach ($subtractedTypesList as $type) {
$subtractedTypes[] = $type;
}

foreach ($subtractedTypes as $subType) {
foreach ($subtractedTypesList as $subType) {
foreach ($allowedSubTypes as $description => $allowedSubType) {
if ($subType->equals($allowedSubType)) {
$subtractedSubTypes[$description] = $subType;
Expand Down

0 comments on commit 23e5e3f

Please sign in to comment.