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

improve phpdoc #5962

Open
wants to merge 20 commits into
base: edge
Choose a base branch
from

Conversation

ColonelMoutarde
Copy link
Contributor

Changes proposed in this pull request:

  • improve phpdoc

Pull request checklist:

  • clear commit messages
  • code manually tested
  • documentation updated

@ColonelMoutarde ColonelMoutarde marked this pull request as draft December 22, 2023 10:02
@ColonelMoutarde ColonelMoutarde marked this pull request as ready for review December 22, 2023 10:40
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Jan 13, 2024
Take advantage of
https://phpstan.org/blog/bring-your-exceptions-under-control

Minimum changes to pass `tooWideThrowType` and `implicitThrows`.

Revert some mistakes from:
FreshRSS#5504
Preparation needed before new PRs of the same type:
FreshRSS#5962

Fix several wrong PHPDocs and catches:

> Method ... has ...Exception in PHPDoc @throws tag but it's not thrown.

> Dead catch - ...Exception is never thrown in the try block.
@Alkarex
Copy link
Member

Alkarex commented Jan 13, 2024

Let's be a bit more methodic with #6037 first

@Alkarex Alkarex added the System care Everything related to the system care label Jan 13, 2024
@Alkarex Alkarex added this to the 1.24.0 milestone Jan 13, 2024
Alkarex added a commit that referenced this pull request Jan 15, 2024
Take advantage of
https://phpstan.org/blog/bring-your-exceptions-under-control

Minimum changes to pass `tooWideThrowType` and `implicitThrows`.

Revert some mistakes from:
#5504
Preparation needed before new PRs of the same type:
#5962

Fix several wrong PHPDocs and catches:

> Method ... has ...Exception in PHPDoc @throws tag but it's not thrown.

> Dead catch - ...Exception is never thrown in the try block.
@Alkarex
Copy link
Member

Alkarex commented Jan 17, 2024

Adding all the @throws can probably be done automatically. It would be nice to search for a tool instead of doing too much by hand.
Maybe https://phpstan.org/blog/introducing-phpstan-pro for instance
Input / tests welcome

@Alkarex Alkarex modified the milestones: 1.24.0, 1.25.0 Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System care Everything related to the system care
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants