Skip to content

Commit 3845338

Browse files
Simplify
1 parent 122b06b commit 3845338

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Rules/RuleLevelHelper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,23 @@ private function transformAcceptedType(Type $acceptingType, Type $acceptedType):
9393
return $acceptedType;
9494
}
9595

96-
return $this->transformCommonType(new CallableType(
96+
return new CallableType(
9797
$acceptedType->getParameters(),
9898
$traverse($acceptedType->getReturnType()),
9999
$acceptedType->isVariadic(),
100100
$acceptedType->getTemplateTypeMap(),
101101
$acceptedType->getResolvedTemplateTypeMap(),
102102
$acceptedType->getTemplateTags(),
103103
$acceptedType->isPure(),
104-
));
104+
);
105105
}
106106

107107
if ($acceptedType instanceof ClosureType) {
108108
if ($acceptedType->isCommonCallable()) {
109109
return $acceptedType;
110110
}
111111

112-
return $this->transformCommonType(new ClosureType(
112+
return new ClosureType(
113113
$acceptedType->getParameters(),
114114
$traverse($acceptedType->getReturnType()),
115115
$acceptedType->isVariadic(),
@@ -123,7 +123,7 @@ private function transformAcceptedType(Type $acceptingType, Type $acceptedType):
123123
$acceptedType->getUsedVariables(),
124124
$acceptedType->acceptsNamedArguments(),
125125
$acceptedType->mustUseReturnValue(),
126-
));
126+
);
127127
}
128128

129129
if (
@@ -142,10 +142,10 @@ private function transformAcceptedType(Type $acceptingType, Type $acceptedType):
142142
}
143143
}
144144

145-
return $traverse($this->transformCommonType($acceptedType));
145+
return $traverse($acceptedType);
146146
});
147147

148-
return [$acceptedType, $checkForUnion];
148+
return [$this->transformCommonType($acceptedType), $checkForUnion];
149149
}
150150

151151
/** @api */

0 commit comments

Comments
 (0)