Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/permission_spreadsheet/tests/src/Functional/ExportFormTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/permission_spreadsheet/tests/src/Functional/FormTestBase.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
47 | ERROR | The array declaration extends to column 104 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/permission_spreadsheet/tests/src/Functional/ImportFormTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
78 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
80 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/permission_spreadsheet/src/RoleLoaderTrait.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | [x] Expected "\Generator\Drupal\user\Entity\Role" but found "\Generator<\Drupal\user\Entity\Role>" for function return type
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/permission_spreadsheet/src/Form/ImportForm.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
105 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
142 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over multiple lines
144 | ERROR | [ ] The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/permission_spreadsheet/src/PhpSpreadsheetHelperTrait.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
23 | ERROR | Type hint "\PhpOffice\PhpSpreadsheet\Spreadsheet" missing for $spreadsheet
--------------------------------------------------------------------------------------------
Time: 7.9 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/permission_spreadsheet/
Proposed resolution
Above error/warnings need to be fixed.