- Issue created by @kinyein
- šØš“Colombia kinyein
Hi, I made a merge request to fix the coding standards issue in this module, I hope it can be reviewed soon
- First commit to issue fork.
- šµšPhilippines clarkssquared
Hi kinyein,
I added a small commit in your MR because I its previous version there's this PHPCS issues
ā decoupled_interface_translations git:(1.0.x) curl https://git.drupalcode.org/project/decoupled_interface_translations/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6667 0 6667 0 0 11764 0 --:--:-- --:--:-- --:--:-- 11926 patching file 'src/Controller/DecoupledInterfaceTranslationsController.php' ā decoupled_interface_translations git:(1.0.x) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml decoupled_interface_translations FILE: ...e_translations/src/Controller/DecoupledInterfaceTranslationsController.php -------------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Controller\ControllerBase. 114 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
Then I added a commit to fix the use statements order, the remaining PHPCS issue is \Drupal calls should be avoided in classes, use dependency injection instead and I will leave the decision to the maintainers if this issue should be fixed or not.
Retaining the status to needs review.
- š®š³India akulsaxena
Hi @clarkssquared
The Gitlab considers Dependency injections to be a part of PHPStan testing and not PHPCS
Since this issue is focused on coding standards and errors of codesniffer (PHPCS), the changes in the MR are good and solve them all.
Another issue can be created for PHPStan errors while this one can be moved to RTBC and then merged