adixon / ca.civicrm.logviewer

CiviCRM Log Viewer
Other
9 stars 11 forks source link

PHPStan Static Code Analysis: Level 5 #19

Open jofranz opened 11 months ago

jofranz commented 11 months ago

Related to #16

Current scan on master (7e11c16d532e77639f2e923c71a0f0b3b6274357). Scan results:

phpstan analyse -c ~/repositories/ext/phpstan.general.neon.dist -l 5 .                                                                                                    ✱
 7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------ 
  Line   logviewer.php                                                           
 ------ ------------------------------------------------------------------------ 
  56     Call to deprecated method retrieve() of class CRM_Core_BAO_Navigation.  
 ------ ------------------------------------------------------------------------ 

 ------ ---------------------------------------------------------------------- 
  Line   mixin/polyfill.php                                                    
 ------ ---------------------------------------------------------------------- 
  77     Parameter #2 $return of function var_export expects bool, int given.  
 ------ ---------------------------------------------------------------------- 

 [ERROR] Found 2 errors                                                                                                 
adixon commented 9 months ago

Thanks for this.

I'm going to ignore the error in mixin/polyfill.php since that's generated by civix (which I'll expect to be fixed with a civix update).

Line 56 in logviewer.php - that's some old code used to insert the navigation menu item. I believe civix now provides a better function for doing this. i.e. a todo ...