Fix issues reported by PHPStan

Created on 3 December 2024, 19 days ago

Problem/Motivation

With 📌 Integration with Gitlab CI Active in place, we can start checking for PHPStan. There is a report now for the issues we can fix.

------ ----------------------------------------- 
  Line   src/Plugin/FieldWidgetPluginManager.php  
 ------ ----------------------------------------- 
  14     Plugin definitions cannot be altered.    
 ------ ----------------------------------------- 
 ------ --------------------------------------------------- 
  Line   tests/src/Unit/FieldWidgetPluginTest.php           
 ------ --------------------------------------------------- 
  90     Call to deprecated method returnValue() of class   
         PHPUnit\Framework\TestCase:                        
         Use $double->willReturn() instead of  
         $double->will($this->returnValue())
 ------ --------------------------------------------------- 
 ------ --------------------------------------------------- 
  Line   tests/src/Unit/MaskUnitTest.php                    
 ------ --------------------------------------------------- 
  64     Call to deprecated method returnValue() of class   
         PHPUnit\Framework\TestCase:                        
         Use $double->willReturn() instead of  
         $double->will($this->returnValue())  
  71     Call to deprecated method returnValue() of class   
         PHPUnit\Framework\TestCase:                        
         Use $double->willReturn() instead of  
         $double->will($this->returnValue()) 
 ------ --------------------------------------------------- 
 [ERROR] Found 4 errors                                      

Steps to reproduce

Run phpstan analyse

Proposed resolution

-

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

📌 Task
Status

Active

Version

2.1

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

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