Fix the issues reported by phpcs in the modules directory

Created on 22 December 2021, about 3 years ago
Updated 12 March 2024, 10 months ago

Problem/Motivation

Child issue from https://www.drupal.org/project/gutenberg/issues/3255691 📌 [META] PHPCS errors on code Needs review
The idea here is to fix all phpcs errors/warnings from the files in the modules/ 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 modules/ > phpcs_gutenber_modules.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.

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇷Brazil andregp

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
     /**
    - * Class CloudBlock.
    + * Class CloudBlock stores data from Blocks.
      */

    A class short description must not start with Class followed by the class name.

     /**
    - * Class CloudBlockBase.
    + * Base class for Cloud Block.
      */
     class CloudBlockBase implements CloudBlockInterface {

    An article is missing before base class and cloud block.
    block should probably be blocks.

       /**
        * Block view css.
        *
        * @var null
        */
    -  protected $view_css = NULL;
    +  protected $viewCss = NULL;

    NULL is the default value, not the property type.

     /**
    - * Class CloudBlockManager.
    + * Class to Manage the CloudBlocks.
      */

    Class short descriptions do not start with Class.
    Only the first word in a sentence is spelled capitalized.
    CloudBlocks should be cloud blocks.

  • 🇮🇳India arpitk

    Hi Updated patch the patch with reference to #8. Please review.

    Thanks!

  • Status changed to Needs review over 1 year ago
  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
Production build 0.71.5 2024