Coding Standard Issue

Created on 1 May 2017, over 7 years ago
Updated 16 July 2024, 4 months ago

Need to remove errors from code.

๐Ÿ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States cmsMinds

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi @avinashm,

    After applying your Patch #4 to the Custom Messages module against 8.x-1.x-dev on Drupal 10, not all of the PHPCS errors were resolved.
    See errors below:

    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/custom_messages.info.yml
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | [ ] "core_version_requirement" property is missing in the info.yml file
     4 | ERROR   | [x] Expected 1 newline at end of file; 0 found
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/src/Form/CustomMessageForm.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     19 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
    -------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/src/Form/CustomMessageSettingsForm.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------
     14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    ---------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/src/Entity/CustomMessage.php
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------
     7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase.
    ------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/src/CustomMessageAccessControlHandler.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: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/custom_messages/src/CustomMessageListBuilder.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     32 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------
    
    Time: 125ms; Memory: 10MB

    I ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml custom_messages

    I'm moving this to โ€˜Needs workโ€™ for now.

    Thank you!

  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Hello,
    I reviewed all issues and fixed all the problems reported by phpcs. Please review the attached patch.

  • Status changed to RTBC 4 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi @silvi.addweb,

    I have reviewed the changes and confirmed that Patch #6 was applied cleanly to the Custom Messages module against 8.x-1.x-dev on Drupal 10.
    And all PHPCS errors have been fixed.

    I ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml custom_messages

    Please see the attached file for reference.

    I'm moving this now to โ€˜RTBCโ€™.

    Thank you!

Production build 0.71.5 2024