Fix issues reported by phpstan

Created on 26 October 2023, 8 months ago

Problem/Motivation

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ------------------------------------------------------------------------------ 
  Line   message_subscribe_ui/src/Controller/SubscriptionController.php                
 ------ ------------------------------------------------------------------------------ 
  74     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------ 
  Line   message_subscribe_ui/src/Plugin/Block/Subscriptions.php                       
 ------ ------------------------------------------------------------------------------ 
  98     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------ 
  Line   message_subscribe_ui/src/Plugin/Derivative/MessageSubscribeUiLocalTask.php    
 ------ ------------------------------------------------------------------------------ 
  36     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------ 
  Line   src/Form/MessageSubscribeAdminSettings.php                                    
 ------ ------------------------------------------------------------------------------ 
  35     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/QueueWorker/MessageSubscribe.php                                   
 ------ ------------------------------------------------------------------------------ 
  42     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 [ERROR] Found 5 errors      

Steps to reproduce

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