Fix the issues reported by phpcs

Created on 4 May 2023, over 1 year ago
Updated 14 August 2024, 4 months ago
šŸ“Œ Task
Status

Needs work

Version

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

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

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
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
    -core: 8.x
    +core_version_requirement: 8.x

    core_version_requirement is not recognized from any Drupal version before Drupal 8.8. That requirement needs to be changed.

    +/**
    + * @file
    + * Primary module hooks for Node Menu moodule.
    + */
    +

    The short description for that module is Hook implementations for the Node menus module. since Drupal core does not have primary nor secondary hooks.
    moodule is a mispelled word.

    +    // We need to sync menu item. Things will break if we try to do similar
    +    // logicfound in menu ui submit callback, token module breaks hard.

    There is a missing space between logic and found, since those are two distinct words.

     /**
    - * Node form validate callback.
      * Sync main parent item with selected item from language menu.
      *
      * @param array $form
    - * @param FormStateInterface $form_state
    + *   The array of form values.S.
    + * @param \Drupal\Core\Form\FormStateInterface $form_state
    + *   Form cuurent state.
      */
     function node_menus_form_node_form_validate($form, FormStateInterface $form_state) {

    The documentation comment for a validation handler is different and it does not need to describe its parameters.

    -  // TODO make validation work again.
    -  //$form['#validate'][] = 'node_menus_form_node_type_form_validate';
    +  // @todo make validation work again.

    What follows @todo is a sentence: It starts with a capitalized word and it ends with a period.

  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India Soham Sengupta

    Hi, I have updated the patch with the changes

  • Status changed to Needs work over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    +core_version_requirement: ^8 || ^9 || ^10

    The minimum Drupal 8 version must be 8.8, so the first requirement needs to be ^8.8.

    + * @return array
    + *   An array that contains default values for the menu link form.

    The default values for the menu link form. is sufficient.

  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India Soham Sengupta

    Thanks, Updated the patch as per the suggestions.

  • Hi, Reviewed the patch #6, applies cleanly and resolves all the phpcs errors/warnings. And also addresses the comments mentioned at #5 .

  • šŸ‡®šŸ‡³India dev16.addweb

    Re-roll the patch #8 according to the latest code changes.

  • Status changed to RTBC 4 months ago
  • Hi @everyone,

    Applied the re-rolled patch, confirmed no errors reported too.

     node_menus git:(8.x-2.x) curl https://www.drupal.org/files/issues/2024-05-29/node_menus-3358098-8.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  6651  100  6651    0     0  20674      0 --:--:-- --:--:-- --:--:-- 21181
    patching file node_menus.info.yml
    patching file node_menus.module
    āžœ  node_menus git:(8.x-2.x) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig node_menus
    āžœ  contrib git:(master) āœ—

    Will now move this to RTBC

    Thanks,
    Jake

  • Status changed to Needs work 4 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    Let's create a merge request, now that patches are no longer tested.

  • Assigned to apaderno
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Success
    4 months ago
    Total: 218s
    #254201
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Issue was unassigned.
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
Production build 0.71.5 2024