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 Static Code Analysis: Level 0 #13

Open
jofranz opened this issue Jan 5, 2024 · 2 comments
Open

PHPStan Static Code Analysis: Level 0 #13

jofranz opened this issue Jan 5, 2024 · 2 comments

Comments

@jofranz
Copy link
Member

jofranz commented Jan 5, 2024

Current scan on master (48068f7). Scan results:


 ------ ---------------------------------------------------------------------- 
  Line   CRM/Committees/CustomData.php                                         
 ------ ---------------------------------------------------------------------- 
  151    Call to an undefined static method CRM_Core_OptionGroup::getValue().  
 ------ ---------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------- 
  Line   CRM/Committees/Implementation/OxfamSimpleSync.php                                                                      
 ------ ----------------------------------------------------------------------------------------------------------------------- 
  514    Method CRM_Committees_Implementation_OxfamSimpleSync::syncModel() should return bool but return statement is missing.  
  991    Instantiated class CiviCRM_API3_Exception not found.                                                                   
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols                                                     
 ------ ----------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------ 
  Line   CRM/Committees/Implementation/PersonalOfficeSyncer.php                                                                        
 ------ ------------------------------------------------------------------------------------------------------------------------------ 
  125    Call to an undefined method CRM_Committees_Implementation_PersonalOfficeSyncer::extractCurrentCommittees().                   
  174    Method CRM_Committees_Implementation_PersonalOfficeSyncer::extractCurrentContacts() invoked with 2 parameters, 3-4 required.  
  347    Call to an undefined method CRM_Committees_Implementation_PersonalOfficeSyncer::addCurrentMemberships().                      
  388    Access to undefined constant CRM_Committees_Implementation_PersonalOfficeSyncer::COMMITTEE_TRACKER_PREFIX.                    
  404    Method CRM_Committees_Implementation_PersonalOfficeSyncer::syncModel() should return bool but return statement is missing.    
  487    Caught class CiviCRM_API3_Exception not found.                                                                                
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols                                                            
  502    Caught class CiviCRM_API3_Exception not found.                                                                                
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols                                                            
 ------ ------------------------------------------------------------------------------------------------------------------------------ 

 ------ --------------------------------------------------------------------------------------------------------------------- 
  Line   CRM/Committees/Implementation/SessionSyncer.php                                                                      
 ------ --------------------------------------------------------------------------------------------------------------------- 
  387    Method CRM_Committees_Implementation_SessionSyncer::syncModel() should return bool but return statement is missing.  
  724    Caught class CiviCRM_API3_Exception not found.                                                                       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols                                                   
 ------ --------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------- 
  Line   CRM/Committees/Model/Email.php                                               
 ------ ----------------------------------------------------------------------------- 
  41     Result of method CRM_Committees_Model_Entity::__construct() (void) is used.  
 ------ ----------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------- 
  Line   CRM/Committees/Model/Url.php                                                 
 ------ ----------------------------------------------------------------------------- 
  37     Result of method CRM_Committees_Model_Entity::__construct() (void) is used.  
 ------ ----------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   CRM/Committees/Plugin/Base.php                                       
 ------ --------------------------------------------------------------------- 
  438    Caught class CiviCRM_API3_Exception not found.                       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   CRM/Committees/Plugin/Syncer.php                                     
 ------ --------------------------------------------------------------------- 
  109    Caught class CiviCRM_API3_Exception not found.                       
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------- 
  Line   CRM/Committees/Tools/IdTrackerTrait.php (in context of class CRM_Committees_Implementation_OxfamSimpleSync)  
 ------ ------------------------------------------------------------------------------------------------------------- 
  265    Access to protected property $idt_trackerID2contactIDbyPrefix of class CRM_Committees_Tools_IdTrackerTrait.  
 ------ ------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------ 
  Line   CRM/Committees/Tools/IdTrackerTrait.php (in context of class CRM_Committees_Implementation_PersonalOfficeSyncer)  
 ------ ------------------------------------------------------------------------------------------------------------------ 
  265    Access to protected property $idt_trackerID2contactIDbyPrefix of class CRM_Committees_Tools_IdTrackerTrait.       
 ------ ------------------------------------------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------------------------------------- 
  Line   CRM/Committees/Tools/IdTrackerTrait.php (in context of class CRM_Committees_Implementation_SessionSyncer)    
 ------ ------------------------------------------------------------------------------------------------------------- 
  265    Access to protected property $idt_trackerID2contactIDbyPrefix of class CRM_Committees_Tools_IdTrackerTrait.  
 ------ ------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------ 
  Line   committees.civix.php                                                                
 ------ ------------------------------------------------------------------------------------ 
  216    Call to static method instance() on an unknown class CRM_Committees_Upgrader_Base.  
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols                  
 ------ ------------------------------------------------------------------------------------ 

                                                                                                                        
 [ERROR] Found 20 errors                                                                                                
                                                                                                                        

@jofranz
Copy link
Member Author

jofranz commented Jan 5, 2024

@bjendres Some scan results, as you are currently working on this ext

@bjendres
Copy link
Member

bjendres commented Jan 5, 2024

@bjendres Some scan results, as you are currently working on this ext

Thanks! :-)

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

No branches or pull requests

2 participants