Problem/Motivation

This is a good first time issue for new users

The pipeline lists a number of phpstan errors that need to be address

Steps to reproduce

N/A

Proposed resolution

Address all

Remaining tasks

Do it
Implement
Pipeline works

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork quicktabs-3492949

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

smustgrave created an issue. See original summary.

immaculatexavier’s picture

Issue tags: +Singapore2024
smustgrave’s picture

FYI I tagged for novice for new users to try first

smustgrave’s picture

So please reserve for them. Ticket isn’t 24hours old yet

rahul_’s picture

I can take this, and start work on it.

anish.a made their first commit to this issue’s fork.

anish.a’s picture

FYI, these are the errors

 30/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------ 
  Line   quicktabs_accordion/src/Plugin/TabRenderer/AccordionTabs.php                  
 ------ ------------------------------------------------------------------------------ 
  54     \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------ 
  Line   quicktabs_jqueryui/src/Plugin/TabRenderer/UiTabs.php                          
 ------ ------------------------------------------------------------------------------ 
  27     \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Controller/QuickTabsController.php                                             
 ------ ----------------------------------------------------------------------------------- 
  48     Unsafe usage of new static().                                                      
         💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ----------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Form/QuickTabsInstanceEditForm.php                                             
 ------ ----------------------------------------------------------------------------------- 
  49     Unsafe usage of new static().                                                      
         💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ----------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   src/Plugin/Block/QuickTabsBlock.php                                                
 ------ ----------------------------------------------------------------------------------- 
  50     Unsafe usage of new static().                                                      
         💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ----------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/Derivative/QuickTabsBlock.php                                      
 ------ ------------------------------------------------------------------------------ 
  18     \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/TabRenderer/QuickTabs.php                                          
 ------ ------------------------------------------------------------------------------ 
  74     \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/TabType/BlockContent.php                                           
 ------ ------------------------------------------------------------------------------ 
  67     \Drupal calls should be avoided in classes, use dependency injection instead  
  69     \Drupal calls should be avoided in classes, use dependency injection instead  
  75     \Drupal calls should be avoided in classes, use dependency injection instead  
  81     \Drupal calls should be avoided in classes, use dependency injection instead  
  97     \Drupal calls should be avoided in classes, use dependency injection instead  
  98     \Drupal calls should be avoided in classes, use dependency injection instead  
  121    \Drupal calls should be avoided in classes, use dependency injection instead  
  122    \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/TabType/NodeContent.php                                                                                  
 ------ -------------------------------------------------------------------------------------------------------------------- 
  35     \Drupal calls should be avoided in classes, use dependency injection instead                                        
  60     \Drupal calls should be avoided in classes, use dependency injection instead                                        
  62     Method Drupal\quicktabs\Plugin\TabType\NodeContent::render() should return string but return statement is missing.  
  64     \Drupal calls should be avoided in classes, use dependency injection instead                                        
  70     \Drupal calls should be avoided in classes, use dependency injection instead                                        
 ------ -------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/TabType/QtabsContent.php                                           
 ------ ------------------------------------------------------------------------------ 
  27     \Drupal calls should be avoided in classes, use dependency injection instead  
  48     \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/TabType/ViewContent.php                                            
 ------ ------------------------------------------------------------------------------ 
  76     \Drupal calls should be avoided in classes, use dependency injection instead  
  81     \Drupal calls should be avoided in classes, use dependency injection instead  
  86     \Drupal calls should be avoided in classes, use dependency injection instead  
  89     \Drupal calls should be avoided in classes, use dependency injection instead  
  102    \Drupal calls should be avoided in classes, use dependency injection instead  
  180    \Drupal calls should be avoided in classes, use dependency injection instead  
 ------ ------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/views/style/Quicktabs.php                                                                                
 ------ -------------------------------------------------------------------------------------------------------------------- 
  5      Interface Drupal\Core\Form\FormStateInterface referenced with incorrect case: Drupal\core\form\FormStateInterface.  
 ------ -------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 29 errors                                                                                                
                                                                                                                        

lavanyatalwar’s picture

Assigned: Unassigned » lavanyatalwar

Working on it.

anish.a’s picture

Assigned: lavanyatalwar » Unassigned

@lavanyatalwar It is already being worked on by @rahul_ in DrupalCon Singapore and he is already in finishing stages. I suggest to take up another issue to avoid duplicate work.

rahul_’s picture

I am still working on this, will continue for another 24 hours.

Till Now -
I fixed most of the Errors mentioned above, and only a few are remaining, once I fix them tomorrow, and test the module, I will mark PR as ready for review.

ddev . phpstan analyze web/modules/contrib/quicktabs

smustgrave’s picture

Priority: Normal » Major
smustgrave’s picture

Following up on this, would like to include in the release.

rahul_’s picture

Still working on this.

anish.a’s picture

@rahul_ Can you push the WIP in the branch, so that I can take a look.

rahul_’s picture

@anish.a you can continue from scratch, because due to some mistake, all my code is reverted :(.

anish.a’s picture

I am taking this up. I will push the changes on what I had done by today itself.

anish.a’s picture

Created a draft MR. I still need to fix the dependency injection errors, continuing the work.

anish.a’s picture

Assigned: Unassigned » anish.a
Status: Active » Needs work

Changing the status and assigning to me as I am continuing working on this.

anish.a’s picture

I had submitted a rough draft and I need some help on finishing it.

smustgrave’s picture

Status: Needs work » Fixed

Thanks all

Status: Fixed » Closed (fixed)

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