Problem/Motivation
Child issue from https://www.drupal.org/project/gutenberg/issues/3255691
The idea here is to fix all phpcs errors/warnings from the files in the scripts/ directory.
Steps to reproduce
Open the Gutenberg module directory on your terminal and run the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml scripts/ > phpcs_gutenber_scripts.txt. You should end up with a file like the one attached bellow.
Proposed resolution
Fix the errors either automatically or manually and create a patch.
Comments
Comment #2
andregp commentedI'm working on a patch =)
Comment #3
andregp commentedHere is the patch. The biggest change I had to do on the code was to move the generate-vendor.php constants to a dedicated interface in order to follow the phpcs standard and suppress the warning:
Global constants should not be used, move it to a class or interface. I'm not sure though if this would be the best solution on the maintainers point of view.Comment #4
Matheus Macario commentedComment #5
Matheus Macario commentedreview done on scripts/ :
- Installed module
- Code review on changes made on the #3 patch (3255697-3)
- no errors popped out, all good
Comment #6
alanmoreira commentedThe patch needs a re-roll, i will work on it.
Comment #7
alanmoreira commentedThe patch does not apply because the errors has already been solved.