Fix the issues reported by phpcs

Created on 26 April 2023, over 1 year ago
Updated 23 May 2023, over 1 year ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Run:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/entity_diff_ui/

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India dineshkumarbollu

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

  • Issue created by @dineshkumarbollu
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi dineshkumarbollu

    I reviewed patch #2 and there is still ramaining 1 warning shown below:

    FILE: /Users/studenttrainees/Drupal2/drupalsite/docroot/modules/contrib/entity_diff_ui/src/Utility/RevisionOperationTrait.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
    44 | WARNING | Unused variable $time.
    -----------------------------------------------------------------------------------------------------------------------------

    Time: 883ms; Memory: 12MB

    Please check.
    Thank Yuo.

  • Assigned to nitin_lama
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India nitin_lama India

    Here's the updated patch.

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi nitin_lama

    I reviewed patch #6 and confirmed it fixes the remaining warning. Drupal core 9.5.8, Entity Diff UI 1.0.x-dev.

    I added screenshot for reference.
    Thank You.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +* Tick the 'Create new revision' box for the Media type which you want to
    +compare the revisions for.

    Since that is part of a list, the second line must be indented.

    +/**
    + * @file
    + * Decribe hooks of the Entity Diff ui module.
    + */
    + * @file
    + * Define hooks of block Diff Ui module.
    + */

    The usual module description is Hook implementations for the [module name] module. where [module name] is replaced by the module name shown in the .info.yml file.

     function block_diff_ui_entity_type_alter(array &$entity_types) {
    -  
    -  /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
    -  
    +
    +  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */

    There must not be empty lines after the function declaration and before its first code line.

    -   *   (optional) The block content revision ID. If not specified, but $block_content is, access
    -   *   is checked for that object's revision.
    -   * @param EditorialContentEntityBase $block_content
    -   *   (optional) A Block Content object. Used for checking access to a block's default
    -   *   revision when $block_content_revision is unspecified. Ignored when $block_content_revision
    -   *   is specified. If neither $block_content_revision nor $block_content are specified, then
    +   *   (optional) The block content revision ID. If not specified, but
    +   *   $block_content is, access is checked for that object's revision.
    +   * @param \Drupal\Core\Entity\EditorialContentEntityBase $block_content
    +   *   (optional) A Block Content object. Used for checking access to a block's
    +   *   default revision when $block_content_revision is unspecified. Ignored
    +   *   when $block_content_revision is specified. If neither
    +   *   $block_content_revision nor $block_content are specified, then

    Avoiding that lines exceed 80 characters means getting their length as close as possible to 80 characters, not making the line's length 40 or 50 characters.

  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    Addressed #8.
    Updated patch.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
Production build 0.71.5 2024