Fix the issues reported by phpcs

Created on 10 July 2024, 8 months ago

Problem/Motivation

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

FILE: /var/www/html/d10/web/modules/contrib/entity_sync_group/src/Plugin/EntitySync/FieldTransformer/EntityParentGroup.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Plugin\PluginManagerInterface.
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------

Time: 111ms; Memory: 10MB


Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

šŸ“Œ Task
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India hetal.solanki

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

Merge Requests

Comments & Activities

  • Issue created by @hetal.solanki
  • Merge request !1Fixed Issue ā†’ (Open) created by hetal.solanki
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • Status changed to RTBC 8 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @Hetal.Solanki,

    I applied MR!1, it was applied smoothly and fixed the phpcs issues.

    āžœ  entity_sync_group git:(1.x) curl https://git.drupalcode.org/project/entity_sync_group/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   996    0   996    0     0   2789      0 --:--:-- --:--:-- --:--:--  2797
    patching file src/Plugin/EntitySync/FieldTransformer/EntityParentGroup.php
    āžœ  entity_sync_group git:(1.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml entity_sync_group
    āžœ  contrib git:(main) āœ—

    Thank you.

  • Status changed to Closed: won't fix 8 months ago
  • šŸ‡µšŸ‡ŖPeru krystalcode

    Thanks for the MR. The module provides its own PHPCS configuration file, you need to use that. Feel free to reopen this issue if you find coding standards violations using that file.

    https://git.drupalcode.org/project/entity_sync_group/-/blob/1.x/.phpcs.x...

Production build 0.71.5 2024