Fix the issues reported by phpcs

Created on 16 January 2023, almost 2 years ago
Updated 21 August 2024, 3 months ago
๐Ÿ“Œ Task
Status

RTBC

Version

3.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

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

Not all content is available!

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

  • Assigned to Sonal Gyanani
  • Issue was unassigned.
  • Status changed to RTBC almost 2 years ago
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
     /**
    - * Class FormManglerService.
    + * The Class FormManglerService.
      *

    That description is still repeating the class name without describing what the class does.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    Please review.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
     /**
    - * Class FormManglerService.
    + * Service provider class.

    That is a service class, not a service provider class.
    Service class is too generic; the description must say what the class does.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

    Hi

    I change the #9 comment on class description please review.

    Thanks

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Jaspreet-Kaur

    Reviewed! MR! 1 applied, all errors and warnings are fixed.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi,

    Confirmed no PHPCS errors after applying Patch #2 and the latest MR! to the Token Content Access module with version 3.0.x-dev on Drupal core version 9.5.8.

    Marking this now as RTBC.
    Kindly refer to the attached screenshots, please.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
     /**
    - * Class FormManglerService.
    + * Defines FormManglerService class.

    The description just repeats the class name; it does not say what the class does.

    The report shows errors/warnings for eight files, but the MR changes just 6 files.

  • Assigned to imustakim
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia imustakim Ahmedabad
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia imustakim Ahmedabad
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
     /**
    - * Class FormManglerService.
    + * The form mengler service.
      *
      * @package Drupal\tca
      */
     class FormManglerService {

    There is a typo in the description.

    +  /**
    +   * Constructs a new Drupal\tca\FormManglerService object.
        */
       public function __construct(
         EntityTypeManagerInterface $etm,
         EntityTypeBundleInfo $etbi,
         TcaPluginManager $tca_plugin_manager,
         TcaSettingsManager $tca_settings_manager,
    -    TranslationInterface $translation) {
    +    TranslationInterface $translation,
    +    ModuleHandlerInterface $module_handler,
    +    MessengerInterface $messenger) {
    
    +  /**
    +   * Constructs a new \Drupal\tca\TcaSettingsManager object.
        */
       public function __construct(
         EntityTypeManagerInterface $etm,
    -    ConfigFactory $config_factory) {
    +    ConfigFactory $config_factory,
    +    PrivateKey $private_key) {

    The parameters must be described, in the documentation comment.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs review 12 months ago
  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi,

    After reviewing and applying the MR!1 to the Token Content Access module with 3.0.x-dev on Drupal 10, not all of the PHPCS errors were resolved.
    Please see below:

    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/tca.module
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/modules/tca_commerce_product/tca_commerce_product.module
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\views\Plugin\views\query\QueryPluginBase.
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/modules/tca_node/tca_node.module
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------
     10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\views\Plugin\views\query\QueryPluginBase.
    ------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/TcaSettingsManager.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactory.
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/FormManglerService.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------
     139 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/Access/TcaAccessCheck.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------
     7 | 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/tca/src/Entity/TcaSettings.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
     7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\tca\Exception\InvalidTcaSettingException.
    -----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/Plugin/TcaPluginManager.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/TcaPermissionGenerator.php
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------------------

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

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

    Thank you!

  • First commit to issue fork.
  • Assigned to akshaydalvi212
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshaydalvi212

    I had worked and solved the phpcs issues.

  • Issue was unassigned.
  • Status changed to Needs review 3 months ago
  • Status changed to RTBC 3 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi,

    I have applied the MR!1 again and confirmed all PHPCS errors have been fixed.

    Please see the attached file for reference.

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

    Thank you!

  • Pipeline finished with Success
    3 months ago
    Total: 135s
    #260614
  • Pipeline finished with Success
    3 months ago
    Total: 155s
    #260632
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    avpaderno โ†’ changed the visibility of the branch 3333680-gitlab-ci-reports to hidden.

Production build 0.71.5 2024