-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix typo in ObjectType #3206
Fix typo in ObjectType #3206
Conversation
@@ -1230,15 +1230,15 @@ public function getEnumCases(): array | |||
$className = $classReflection->getName(); | |||
|
|||
if ($this->subtractedType !== null) { | |||
$subtracedEnumCaseNames = []; | |||
$subtractedEnumCaseNames = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo-fix
@@ -1384,7 +1386,7 @@ public function changeSubtractedType(?Type $subtractedType): Type | |||
$subtractedTypesList = TypeUtils::flattenTypes($subtractedType); | |||
$subtractedTypes = []; | |||
foreach ($subtractedTypesList as $type) { | |||
$subtractedTypes[$type->describe(VerbosityLevel::precise())] = $type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need the key of this array and building up the descriptions shows up in profiles of phpstan/phpstan#11263
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after getting rid of the key, it seems we can get rid of the whole loop
intially started as a typo fix, but after some closer looks I was able to remove some unnecessary code repro of phpstan/phpstan#11263 before this PR:
after
|
Thank you. |
No description provided.