Increase PHPStan level

Created on 14 April 2024, 2 months ago
Updated 14 June 2024, 2 days ago
  1. Edit the phpstan.neon file
  2. Run PHPStan locally β†’
  3. If there are no errors raise the level again until you find some
  4. If there are errors fix them and mark this issue for review

Avoid ignores as much as possible, but if you need to ignore something because of a Drupalism, put it in the neon file by error type rather than inline in the code please.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

  • Issue created by @darvanen
  • First commit to issue fork.
  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @amanmansuri72 this issue is for phpstan, not phpcs. That effort belongs on πŸ› Drupal Coding Standards Issues | phpcs Needs work .

  • First commit to issue fork.
  • πŸ‡²πŸ‡¦Morocco h_kac

    Hello,
    I fixed some errors shown at level 2 to level 6 can u check that ?

    For the error below, I have checked the interface containing the signature of the function "get" we have only one param "CountryCode", I think we should remove the second param in the class

    ------ ------------------------------------------------------------------------------- 
      Line   src/Plugin/GraphQL/DataProducer/AddressFormatRepository.php                    
     ------ ------------------------------------------------------------------------------- 
      98     Method                                                                         
             CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface::get()  
             invoked with 2 parameters, 1 required.                                         
     ------ ------------------------------------------------------------------------------- 
    

    What do you think ?

Production build 0.69.0 2024