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.

CommentFileSizeAuthor
#3 3255697-3.patch6.69 KBandregp
phpcs_gutenberg_scripts.txt2.27 KBandregp

Comments

andregp created an issue. See original summary.

andregp’s picture

I'm working on a patch =)

andregp’s picture

Assigned: andregp » Unassigned
Status: Active » Needs review
StatusFileSize
new6.69 KB

Here 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.

Matheus Macario’s picture

Assigned: Unassigned » Matheus Macario
Matheus Macario’s picture

Assigned: Matheus Macario » Unassigned
Status: Needs review » Reviewed & tested by the community

review done on scripts/ :
- Installed module
- Code review on changes made on the #3 patch (3255697-3)
- no errors popped out, all good

alanmoreira’s picture

Assigned: Unassigned » alanmoreira
Status: Reviewed & tested by the community » Needs work

The patch needs a re-roll, i will work on it.

alanmoreira’s picture

Assigned: alanmoreira » Unassigned
Status: Needs work » Closed (outdated)

The patch does not apply because the errors has already been solved.