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

IBX-4929: Fixed PHPDoc(s) referencing static<TValue> return type #216

Merged
merged 3 commits into from
Mar 17, 2023

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Mar 14, 2023

Question Answer
JIRA issue IBX-4929
Type bug
Target Ibexa version v4.4.1
BC breaks no

From phpDocumentor v3.3.1:

  • Unable to parse file "vendor/ibexa/core/src/contracts/Collection/AbstractInMemoryCollection.php", an error was detected: static is not a collection
  • Unable to parse file "vendor/ibexa/core/src/contracts/Collection/StreamableInterface.php", an error was detected: static is not a collection

Use @phpstan-return static<TValue> instead of @return static<TValue>

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ibexa/engineering).

Unable to parse file "vendor/ibexa/core/src/contracts/Collection/AbstractInMemoryCollection.php", an error was detected: static is not a collection
`static<TValue>` is used by static analysis tool.

`@return self` is not necessary.
@adriendupuis adriendupuis changed the title AbstractInMemoryCollection: Fix phpdoc Fix PhpDoc vs PHPStan Mar 14, 2023
@adriendupuis adriendupuis changed the title Fix PhpDoc vs PHPStan IBX-4929: Fix PhpDoc vs PHPStan Mar 14, 2023
@alongosz
Copy link
Member

@adriendupuis any reason this PR is a draft? Drafts are per definition not ready for review and impossible technically to merge.

@adriendupuis
Copy link
Contributor Author

adriendupuis commented Mar 16, 2023

@adriendupuis any reason this PR is a draft? Drafts are per definition not ready for review and impossible technically to merge.

@alongosz The only reason was that I didn't have reached the bottom of the log yet.

@adriendupuis adriendupuis reopened this Mar 16, 2023
@adriendupuis adriendupuis marked this pull request as ready for review March 16, 2023 09:39
@sonarcloud
Copy link

sonarcloud bot commented Mar 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alongosz alongosz changed the title IBX-4929: Fix PhpDoc vs PHPStan IBX-4929: Fixed PHPDoc(s) referencing static<TValue> return type Mar 17, 2023
@alongosz alongosz merged commit af9fdfa into main Mar 17, 2023
@alongosz alongosz deleted the adriendupuis-patch-1 branch March 17, 2023 08:41
@alongosz
Copy link
Member

Thank you @adriendupuis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants