GitLabCI: Fix existing PHPStan issues

Created on 27 June 2024, 12 months ago

Problem/Motivation

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ---------------------------------------------------------------------- 
  Line   src/ConfigProviderConfigInstaller.php                                 
 ------ ---------------------------------------------------------------------- 
  38     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 ------ ------------------------------------------------------ 
  Line   src/Plugin/ConfigProvider/ConfigProviderOptional.php  
 ------ ------------------------------------------------------ 
  92     Undefined variable: $dependency                       
  92     Undefined variable: $dependency                       
 ------ ------------------------------------------------------ 
 ------ ---------------------------------------------------------------------- 
  Line   src/Plugin/ConfigProviderBase.php                                     
 ------ ---------------------------------------------------------------------- 
  65     Access to undefined constant                                          
         static(Drupal\config_provider\Plugin\ConfigProviderBase)::ID.         
  282    \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   tests/src/Kernel/ConfigCollectorTest.php                             
 ------ --------------------------------------------------------------------- 
  36     You should use assertTrue() instead of assertSame() when expecting   
         "true"                                                               
  37     You should use assertFalse() instead of assertSame() when expecting  
         "false"                                                              
 ------ --------------------------------------------------------------------- 
 [ERROR] Found 7 errors  

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joegraduate Arizona, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024