Skip to content
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

remove getDoctrine*() methods from PhpDocInfo, use getByType() instead #1935

Merged
merged 1 commit into from
Aug 31, 2019

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba merged commit 4379b4a into master Aug 31, 2019
@TomasVotruba TomasVotruba deleted the specific-to-get-type branch August 31, 2019 12:00
@@ -6,6 +6,9 @@
// $container->get(Type::class) → instance of "Type"
override(\Psr\Container\ContainerInterface::get(0), type(0));

// $propertyPhpDocInfo->getByType(Type::class) → instance of "Type"|null - @todo how to make this nullable?
override(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo::getByType(0), type(0));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikic Do you have any tip how to teach PHPStorm nullable type?

I tried variations of ↓... but no success

-type(0)
+type(0)|null

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this isn't supported right now. PhpStorm itself doesn't do much in terms of nullability analysis, so the missing null type probably won't result in false positive warnings at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, feature then, thank you 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TomasVotruba added a commit that referenced this pull request Mar 15, 2022
rectorphp/rector-src@7202782 [CodeQuality] Add InlineConstructorDefaultToPropertyRector (#1935)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants