remove getDoctrine*() methods from PhpDocInfo, use getByType() instead#1935
Merged
TomasVotruba merged 1 commit intomasterfrom Aug 31, 2019
Merged
remove getDoctrine*() methods from PhpDocInfo, use getByType() instead#1935TomasVotruba merged 1 commit intomasterfrom
TomasVotruba merged 1 commit intomasterfrom
Conversation
cb7bd9f to
8596ecc
Compare
8596ecc to
72bb8d6
Compare
TomasVotruba
commented
Aug 31, 2019
| 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)); |
Member
Author
There was a problem hiding this comment.
@nikic Do you have any tip how to teach PHPStorm nullable type?
I tried variations of ↓... but no success
-type(0)
+type(0)|nullThere was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
I see, feature then, thank you 👍
Member
Author
There was a problem hiding this comment.
I think I found a way thanks to @Ocramius
See https://github.com/Ocramius/phpunit/blob/2894f1e5eb2cd88708fdba608718e5b6a07391aa/.phpstorm.meta.php
It works as expected 👍
TomasVotruba
added a commit
that referenced
this pull request
Mar 15, 2022
rectorphp/rector-src@7202782 [CodeQuality] Add InlineConstructorDefaultToPropertyRector (#1935)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.