Fix the issues reported by phpcs

Created on 12 April 2023, about 1 year ago

Problem/Motivation

FILE: /domain_registration/domain_registration.module
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 66 | ERROR | The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /domain_registration/src/Tests/DomainRegistrationTest.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 14 | ERROR | Missing member variable doc comment
------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml domain_registration

Proposed resolution

Fix the errors and warnings.

📌 Task
Status

Closed: won't fix

Version

1.8

Component

Code

Created by

🇮🇳India Binoli Lalani Gujarat

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

  • Issue created by @Binoli Lalani
  • @binoli-lalani opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Binoli Lalani Gujarat

    Hello,

    I have fixed PHPCS errors and warnings. Please review MR.

    Thank you!

  • 🇮🇳India Abhijith S

    Applied MR !3. There are some more issues needs to be fixed.

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js,scss domain_registration 
    
    FILE: ...ax domain_registration/domain_registration.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "datestamp" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "version" from the info file, it will be added by
       |         | drupal.org packaging automatically
    --------------------------------------------------------------------------------
    
    
    FILE: ... domain_registration/domain_registration.module
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     8 | WARNING | Global constants should not be used, move it to a class or
       |         | interface
     9 | WARNING | Global constants should not be used, move it to a class or
       |         | interface
    --------------------------------------------------------------------------------
    
    
    FILE: ... domain_registration/src/Tests/DomainRegistrationTest.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 16 WARNINGS AFFECTING 16 LINES
    --------------------------------------------------------------------------------
      35 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      36 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      53 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      54 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      71 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      72 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      89 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
      90 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     107 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     108 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     125 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     126 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     144 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     145 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     162 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
     163 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
    --------------------------------------------------------------------------------
    
  • Status changed to Needs work about 1 year ago
  • Status changed to Closed: won't fix about 1 year ago
  • 🇪🇸Spain pcambra Spain, 🇪🇺

    We're not doing this.

Production build 0.69.0 2024