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

Add RemoveTypedPropertyNonMockDocblockRector #6306

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Sep 15, 2024

No description provided.

@TomasVotruba TomasVotruba changed the title tv cleanup doc Cleanup doc in TypedPropertyFromCreateMockAssignRector to avoid false positives PHPSTan reports Sep 15, 2024
@TomasVotruba TomasVotruba changed the title Cleanup doc in TypedPropertyFromCreateMockAssignRector to avoid false positives PHPSTan reports Cleanup doc in TypedPropertyFromCreateMockAssignRector to avoid PHPStan reports Sep 15, 2024
@TomasVotruba
Copy link
Member Author

I'll split this into 2 rules, to make both steps separated and let user decide which to use.

@TomasVotruba TomasVotruba force-pushed the tv-cleanup-doc branch 2 times, most recently from 52d0b87 to 0dedd20 Compare September 15, 2024 13:40
composer.json Outdated Show resolved Hide resolved
@TomasVotruba
Copy link
Member Author

TomasVotruba commented Oct 11, 2024

In the end, I've confused the property type with original one 😅

This is the use case a new rule should handle instead:

-    /**
-     * @var SomeService|MockObject
-     */
    private SomeService $service;

It's not a mock, just a false leftover

@TomasVotruba TomasVotruba changed the title Cleanup doc in TypedPropertyFromCreateMockAssignRector to avoid PHPStan reports Add RemoveTypedPropertyNonMockDocblockRector Oct 11, 2024
@TomasVotruba TomasVotruba merged commit d8f31e7 into main Oct 11, 2024
36 checks passed
@TomasVotruba TomasVotruba deleted the tv-cleanup-doc branch October 11, 2024 11:20
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.

3 participants