-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 union-type handling in PublicStaticPropertyFetchCollector #121
Merged
Conversation
This file contains 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
staabm
commented
Jul 15, 2024
if ($node->class->toString() === 'self') { | ||
// self fetch is allowed | ||
$classReflection = $scope->getClassReflection(); | ||
if ($classReflection instanceof ClassReflection && $this->classTypeDetector->isTestClass($classReflection)) { |
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.
this collector was missing the "test-only" detection part
should be good to go |
TomasVotruba
approved these changes
Jul 15, 2024
Thanks 😊👍 |
would be great to get a new release. I have no further known problems to work on :-) |
neoighodaro
added a commit
to neoighodaro/unused-public
that referenced
this pull request
Nov 21, 2024
* TomasVotruba-main: (21 commits) Delete .github/FUNDING.yml Update FUNDING.yml Update composer.json Keep the code DRY Small improvement Added support for @internal or @public Reduce memory consumption of collectors (TomasVotruba#131) Fix blade regex to discover method call with args (TomasVotruba#128) Fix template discovery, to include root file too (TomasVotruba#127) remove `composer-dependency-analyser.php` from releases (TomasVotruba#126) Bump deps (TomasVotruba#125) Detect public properties used via Subclass (TomasVotruba#123) Fix ClassConstFetchCollector (TomasVotruba#122) Fix union-type handling in PublicStaticPropertyFetchCollector (TomasVotruba#121) Fix union-type handling in PublicPropertyFetchCollector (TomasVotruba#120) add phpstan error identifiers (TomasVotruba#118) Fixed nette/utils indirect dependency (TomasVotruba#116) Added test for JsonSerialize (TomasVotruba#112) Add RelativeUnusedPublicClassMethodRule (TomasVotruba#111) Bump to PHP 8.2 (TomasVotruba#110) ...
neoighodaro
added a commit
to neoighodaro/unused-public
that referenced
this pull request
Nov 21, 2024
* origin/main: (22 commits) Allow phpstan 2 Delete .github/FUNDING.yml Update FUNDING.yml Update composer.json Keep the code DRY Small improvement Added support for @internal or @public Reduce memory consumption of collectors (TomasVotruba#131) Fix blade regex to discover method call with args (TomasVotruba#128) Fix template discovery, to include root file too (TomasVotruba#127) remove `composer-dependency-analyser.php` from releases (TomasVotruba#126) Bump deps (TomasVotruba#125) Detect public properties used via Subclass (TomasVotruba#123) Fix ClassConstFetchCollector (TomasVotruba#122) Fix union-type handling in PublicStaticPropertyFetchCollector (TomasVotruba#121) Fix union-type handling in PublicPropertyFetchCollector (TomasVotruba#120) add phpstan error identifiers (TomasVotruba#118) Fixed nette/utils indirect dependency (TomasVotruba#116) Added test for JsonSerialize (TomasVotruba#112) Add RelativeUnusedPublicClassMethodRule (TomasVotruba#111) ...
ngmy
pushed a commit
to ngmy/unused-public
that referenced
this pull request
Dec 19, 2024
…otruba#121) * Fix union-type handling in PublicStaticPropertyFetchCollector * another test * fix namespace * Update UnusedPublicPropertyRuleTest.php
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.
analog #120