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.

Issue fork sector-3415160

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dieuwe created an issue. See original summary.

dieuwe changed the visibility of the branch 10.0.x to hidden.

dieuwe changed the visibility of the branch 10.0.x to active.

dieuwe changed the visibility of the branch 10.0.x to hidden.

mohd sahzad’s picture

Assigned: Unassigned » mohd sahzad
mohd sahzad’s picture

Assigned: mohd sahzad » Unassigned

gareth.poole made their first commit to this issue’s fork.

  • gareth.poole committed 02022654 on 10.0.x authored by dieuwe
    Issue #3415160 by dieuwe: Coding standards for sector_workflow from...
heiket’s picture

Status: Active » Reviewed & tested by the community

Tested by both Gareth and Heike. Looking good!

heiket’s picture

gareth.poole’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.