GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
22 stars 8 forks source link

[Fix] PHP parameter errors #11739

Closed esizer closed 3 days ago

esizer commented 1 week ago

🤖 Resolves #11596

👋 Introduction

Fixes PHPStan errors related to method parameters.

🕵️ Details

Most of these were passing lists instead of assoc arrays to validation errors (key must be field with error).

A weird one was the callable signature for the graphql service provider. It is correct but PHPStan was not happy so I just cast it :woman_shrugging:

🧪 Testing

  1. Confirm no parameter errors ignored
  2. Confirm linting passes
  3. Confirm changes make sense
brindasasi commented 5 days ago

linting fails on the same error Line Http/Controllers/AuthController.php


     Ignored error pattern #^Call to an undefined method                              
     Illuminate\\Http\\Client\\Response\:\:getBody\(\)\.$#                            
     in path                                                                          
     /Users/admin/code/gc-digital-talent/api/app/Http/Controllers/AuthController.php  
     was not matched in reported errors.                                              

which I removed in my pr . May want to wait until it gets merged in ?