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

phpstan-8 for category class #5434

Merged

Conversation

ColonelMoutarde
Copy link
Contributor

Changes proposed in this pull request:

  • phpstan-8 for category class

Pull request checklist:

  • clear commit messages
  • code manually tested

@Alkarex Alkarex added this to the 1.22.0 milestone May 30, 2023
/** @var array<FreshRSS_Feed>|null */
/** @var array<FreshRSS_Feed> */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is a good solution, as we need to test for nullability below: if ($this->feeds === null)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got to matermost ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$feedDAO->listByCategory($this->id()); return always a array() of FreshRSS_Feed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below, line 109: if ($this->feeds === null)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @throws Minz_ConfigurationNamespaceException
* @throws Minz_PDOConnectionException
*/

public function feeds(): array {
if ($this->feeds === null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the line testing for null

@Alkarex Alkarex merged commit bab353c into FreshRSS:edge Jun 8, 2023
1 check passed
math-GH pushed a commit to math-GH/FreshRSS that referenced this pull request Jul 4, 2023
* phpstan-8 for category class

* Another approach to nullable
FreshRSS#5434 (comment)

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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.

None yet

2 participants