Coding standards for sector_workflow from drupal-check

Created on 17 January 2024, 10 months ago
Updated 1 February 2024, 10 months ago

PHPStan shows a few code problems that we need to fix so that it can be enabled as part our our build pipeline running green.

  Line   sector/modules/sector_workflow/sector_workflow.module                                                   
 ------ -------------------------------------------------------------------------------------------------------- 
  50     Call to an undefined method Drupal\Core\Cache\RefinableCacheableDependencyInterface::setCacheMaxAge().  
  83     Call to an undefined method Drupal\Core\Entity\RevisionableInterface::get().                            
  94     Call to an undefined method Drupal\Core\Entity\RevisionableInterface::get().                            
  107    Call to an undefined method Drupal\Core\Entity\RevisionableInterface::get().                            
  115    Call to an undefined method Drupal\Core\Entity\RevisionableInterface::get().                            
 ------ -------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------ 
  Line   sector/modules/sector_workflow/src/Plugin/Block/ContentModerationBlock.php                      
 ------ ------------------------------------------------------------------------------------------------ 
  88     Method Drupal\Core\Form\FormBuilderInterface::getForm() invoked with 2 parameters, 1 required.  
 ------ ------------------------------------------------------------------------------------------------ 

A few can be fixed by adding @var comments and doing a bit of code cleanup. The getForm one needs to be ignored since Drupal allows unlimited magic arguments.

๐Ÿ“Œ Task
Status

RTBC

Version

10.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand dieuwe Auckland, NZ

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024