Issues reported by PhpStan

Created on 1 November 2023, 8 months ago

Problem/Motivation

Steps to reproduce

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ------------------------------------------------------------------------------ 
  Line   src/Form/ModerationNoteResolveForm.php                                        
 ------ ------------------------------------------------------------------------------ 
  57     Unsafe usage of new static().                                                 
         💡 See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------ 
  Line   src/ModerationNoteForm.php                                                    
 ------ ------------------------------------------------------------------------------ 
  55     Unsafe usage of new static().                                                 
         💡 See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ---------------------------------------------------------------------- 
  Line   src/Plugin/Mail/NoteMail.php                                          
 ------ ---------------------------------------------------------------------- 
  33     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
  34     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
  36     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
 ------ ---------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/Menu/LocalTask/AssignedNotes.php                                   
 ------ ------------------------------------------------------------------------------ 
  64     Unsafe usage of new static().                                                 
         💡 See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 [ERROR] Found 6 errors   

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States bluegeek9

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

Comments & Activities

Production build 0.69.0 2024