unused use statements

Created on 26 June 2023, almost 2 years ago

--------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
129 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 10

šŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India sonam_sharma

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sonam_sharma
  • Issue was unassigned.
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    Since the issue is showing what PHP_CodeSniffer shows, let us rescope it to fix all the warnings/errors reported by PHP_CodeSniffer.

    The issue summary should always describe what the issue is trying to fix and, in the case of coding standards issues, show which command and arguments have been used and which report that command shown. In this way, project maintainers can verify the patch/MR fixes all the warnings/errors.

  • šŸ‡®šŸ‡³India immaculatexavier

    Updated issue summary.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • šŸ‡®šŸ‡³India kalash-j jaipur

    hello , i have solved all the issues that PHPCS has shown.
    MR!2 have 0 PHPCS error please check.

  • Status changed to RTBC about 1 year ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied the updated MR !2 and I followed the steps to reproduce and confirmed that the PHPCS issues:

    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal --extensions=php,module,inc,install,info,txt,md multi_region 
    
    FILE: ...local/web/modules/contrib/multi_region/src/Form/ConfigurableRegionForm.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     10 | WARNING | The class short comment should describe what the class does and
        |         | not simply repeat the class name
    --------------------------------------------------------------------------------
    
    
    FILE: ...ules/contrib/multi_region/src/Plugin/Block/RegionLanguageSwitcherBlock.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Access\AccessResult.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...b/modules/contrib/multi_region/src/ConfigurableRegionHtmlRouteProvider.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     19 | WARNING | Possible useless method overriding detected
    --------------------------------------------------------------------------------
    
    
    FILE: ...odules/contrib/multi_region/src/ConfigurableRegionAccessControlHandler.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     8 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Access\AccessResult.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...cal/web/modules/contrib/multi_region/src/ConfigurableRegionListBuilder.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     7 | WARNING | [x] Unused use statement
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...rojects/d9/d9-local/web/modules/contrib/multi_region/src/RegionManager.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
       5 | WARNING | [x] Unused use statement
       8 | WARNING | [x] Unused use statement
     129 | ERROR   | [x] Object operator not indented correctly; expected 8 spaces
         |         |     but found 10
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 157ms; Memory: 8MB
    
    āžœ  contrib git:(master) āœ— cd multi_region 
    āžœ  multi_region git:(master) āœ— curl https://git.drupalcode.org/project/multi_region/-/merge_requests/2.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 10218    0 10218    0     0  19688      0 --:--:-- --:--:-- --:--:-- 19918
    patching file 'src/ConfigurableRegionAccessControlHandler.php'
    patching file 'src/ConfigurableRegionHtmlRouteProvider.php'
    patching file 'src/ConfigurableRegionListBuilder.php'
    patching file 'src/Form/ConfigurableRegionForm.php'
    patching file 'src/Plugin/Block/RegionLanguageSwitcherBlock.php'
    patching file 'src/RegionManager.php'
    āžœ  multi_region git:(master) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal --extensions=php,module,inc,install,info,txt,md multi_region
    āžœ  contrib git:(master) āœ— 
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Status changed to Needs work about 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Success
    about 1 year ago
    Total: 139s
    #182809
  • Pipeline finished with Success
    about 1 year ago
    Total: 139s
    #184399
  • Status changed to Needs review about 1 year ago
  • šŸ‡®šŸ‡³India kalash-j jaipur

    @apaderno i have done the changes on the feedback you have provided

  • Status changed to RTBC 10 months ago
  • šŸ‡®šŸ‡³India Tirupati_Singh

    Hi, I've applied the MR!2 as patch and it applied successfully with no errors. After applying patch all the mentioned phpcs errors has been resolved successfully. Hence, moving the issue status to Reviewed and tested.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno → changed the visibility of the branch multi_region-3370016-3370016-fix-issues-by-phpcs to hidden.

  • Pipeline finished with Success
    20 days ago
    Total: 133s
    #494362
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno → changed the visibility of the branch 3370016-gitlab-ci-reports to hidden.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    avpaderno → changed the visibility of the branch 3370016-fix-issues-by-phpcs to hidden.

  • Pipeline finished with Success
    20 days ago
    Total: 224s
    #494372
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Success
    20 days ago
    Total: 146s
    #494378
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
Production build 0.71.5 2024