Problem/Motivation

Running PHPCS in the module I figured out that there are several sniff violations that needs to be fixed in order to achieve Drupal's best practices in code standards.

Steps to reproduce

1. Run phpcs in the file src/Controller/WeMegaMenuAdminController.php:

phpcs --standard=Drupal,DrupalPractice --extensions=php [name of the file]

Proposed resolution

Fix the indicated errors in the command output.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gabrielda created an issue. See original summary.

gabrielda’s picture

I will work on this issue today

gabrielda’s picture

Assigned: gabrielda » Unassigned
Status: Active » Needs review
StatusFileSize
new163.47 KB
new175.44 KB
new85.13 KB
new169.07 KB
new171.16 KB

When I started working in this issue, the errors indicated were the ones indicated in images pre-1, pre-2 and pre-3. Now, the status is the one indicated in the images post-1 and post -2
Please review it.

Cheers,
Gabriel

lucienchalom’s picture

Assigned: Unassigned » lucienchalom
Status: Needs review » Needs work

I looked at the code, it is okay but I will continue with it, on the $POST super global and t() injections.

lucienchalom’s picture

StatusFileSize
new16.2 KB

all the Post superglobal variables have been cleaned, and the 3 t().
the phpcs only show an unused variable and one dependency injection.
will keep working on them.

lucienchalom’s picture

Assigned: lucienchalom » Unassigned
Status: Needs work » Needs review

I did the last dependency injection and the
phpcs --standard=Drupal,DrupalPractice --extensions=php
returns clean.

Thank you

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 last update made by @lucienchalom about the dependency injections and no errors popped out.

rjjakes’s picture

Status: Reviewed & tested by the community » Needs work

The latest MR now has conflicts that need resolving.

shivam_tiwari made their first commit to this issue’s fork.

shivam_tiwari’s picture

Status: Needs work » Needs review
rjjakes’s picture

Status: Needs review » Needs work

@shivam_tiwari - you've just committed the patch file to the repo. That's not a valid way of working.

shivam_tiwari’s picture

Status: Needs work » Needs review
roberttabigue’s picture

Status: Needs review » Needs work
StatusFileSize
new584.62 KB
new501.9 KB

Hi,

I can still reproduce the issue after applying the latest fix to the module Drupal Mega Menu against 8.x-1.x-dev and with Drupal core version 9.5.6.

Please see the attached screenshot for reference.

sakthi_dev’s picture

Assigned: Unassigned » sakthi_dev
sakthi_dev’s picture

Assigned: sakthi_dev » Unassigned
Status: Needs work » Needs review
StatusFileSize
new10.84 KB

Created patch. Please review.

roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new99.15 KB

Hi @sakthi_dev

Confirmed fixed the issue after applying Patch #17.

See the screenshot for reference.

Thanks.

rjjakes’s picture

Status: Reviewed & tested by the community » Needs work

The MR needs rebasing.

sourabhjain’s picture

Assigned: Unassigned » sourabhjain

Let me rebase the MR.

sourabhjain’s picture

Assigned: sourabhjain » Unassigned
lucienchalom’s picture

Status: Needs work » Needs review

I did a rebase on the branch, but I recomend a full review since some changes are ages old.

xaviemirmon’s picture

StatusFileSize
new14.25 KB

@lucienchalom LGTM I've just rerun PHPCS and it's not reporting any problems.

xaviemirmon’s picture

Status: Needs review » Reviewed & tested by the community

  • rjjakes committed 6f04cf9e on 8.x-1.x authored by gabrielda
    Issue #3247955 by lucienchalom, gabrielda, shivam_tiwari, sakthi_dev,...
rjjakes’s picture

Status: Reviewed & tested by the community » Fixed

Merged to 1.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.