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

code improvement for phpstan and humans ;) #5084

Merged
merged 7 commits into from
Feb 9, 2023

Conversation

ColonelMoutarde
Copy link
Contributor

Changes proposed in this pull request:

  • code improvement for phpstan and humans ;)

Pull request checklist:

  • clear commit messages
  • code manually tested

@Alkarex Alkarex added this to the 1.21.0 milestone Feb 8, 2023
@Alkarex Alkarex added the System care Everything related to the system care label Feb 8, 2023
Copy link
Member

@Alkarex Alkarex left a comment

Choose a reason for hiding this comment

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

Please make sure to pass at least PHPStan level 6:

$ vendor/bin/phpstan analyse --level 6 app/Models/Tag.php 
Note: Using configuration file /home/alexandre/GitHub/FreshRSS/phpstan.neon.
 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ --------------------------------------------------------------------------------- 
  Line   Tag.php                                                                          
 ------ --------------------------------------------------------------------------------- 
  :8     Property FreshRSS_Tag::$name has no type specified.                              
  :9     Property FreshRSS_Tag::$attributes has no type specified.                        
  :10    Property FreshRSS_Tag::$nbEntries has no type specified.                         
  :11    Property FreshRSS_Tag::$nbUnread has no type specified.                          
  :21    Method FreshRSS_Tag::_id() has parameter $value with no type specified.          
  :36    Method FreshRSS_Tag::attributes() has parameter $key with no type specified.     
  :44    Method FreshRSS_Tag::_attributes() has parameter $key with no type specified.    
  :44    Method FreshRSS_Tag::_attributes() has parameter $value with no type specified.  
  :59    Method FreshRSS_Tag::nbEntries() has no return type specified.                   
  :67    Method FreshRSS_Tag::_nbEntries() has parameter $value with no type specified.   
  :82    Method FreshRSS_Tag::_nbUnread() has parameter $value with no type specified.    
 ------ --------------------------------------------------------------------------------- 


                                                                                                                        
 [ERROR] Found 11 errors

@Alkarex
Copy link
Member

Alkarex commented Feb 8, 2023

Good start. Please check same comment than #5030 (comment)

@ColonelMoutarde ColonelMoutarde marked this pull request as draft February 8, 2023 13:45
@ColonelMoutarde ColonelMoutarde force-pushed the feature/tag-class-phpstan branch 2 times, most recently from 3afadce to c3ad832 Compare February 8, 2023 15:09
@ColonelMoutarde ColonelMoutarde marked this pull request as ready for review February 8, 2023 15:12
@ColonelMoutarde ColonelMoutarde marked this pull request as draft February 8, 2023 15:54
@ColonelMoutarde
Copy link
Contributor Author

pass PHPSTAN 5

@ColonelMoutarde
Copy link
Contributor Author

Pass PHPStan Leve6

@ColonelMoutarde ColonelMoutarde marked this pull request as ready for review February 8, 2023 16:53
@Alkarex
Copy link
Member

Alkarex commented Feb 8, 2023

I have made it pass PHPStan level 9 08fa965

@Alkarex Alkarex merged commit b9a62a6 into FreshRSS:edge Feb 9, 2023
@ColonelMoutarde ColonelMoutarde deleted the feature/tag-class-phpstan branch May 3, 2023 08:39
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.

3 participants