Fix the issues reported by phpcs

Created on 28 February 2024, 9 months ago
Updated 16 July 2024, 4 months ago

Problem/Motivation

There is a files need to fixed with coding standards.
Here is the command : -
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml web/modules/contrib/config_pages/

Result :-

FILE: ...rojects/d9/d9-local/web/modules/contrib/config_pages/config_pages.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: ...dules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
 217 | WARNING | Unused variable $cp_type.
 217 | WARNING | Unused variable $data_type.
--------------------------------------------------------------------------------


FILE: .../web/modules/contrib/config_pages/src/Controller/ConfigPagesController.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 169 | WARNING | \Drupal calls should be avoided in classes, use dependency
     |         | injection instead
--------------------------------------------------------------------------------


FILE: ...s/d9/d9-local/web/modules/contrib/config_pages/src/ConfigPagesTypeForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 118 | WARNING | \Drupal calls should be avoided in classes, use dependency
     |         | injection instead
--------------------------------------------------------------------------------

Time: 858ms; Memory: 12MB

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR .

๐Ÿ“Œ Task
Status

Needs review

Version

2.15

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia chandansha

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 @chandansha
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    7 pass
  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chandansha

    fixed all issue. But still there are some issues left.
    Please have a look.

    FILE: /home/chandansha/docker/testd10/web/modules/issue/config_pages-3424331/src/ConfigPagesTypeForm.php
    --------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     118 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/config_pages-3424331/src/Controller/ConfigPagesController.php
    ---------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------
     169 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------------
    
    Time: 547ms; Memory: 12MB
    
  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I applied MR !36 and I confirmed that it fixes most of the PHPCS issues stated above, but since there are few remaining PHPCS issues I will move this ticket to needs work so that all PHPCS issues will be resolved.

    โžœ  config_pages git:(master) โœ— curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 25607    0 25607    0     0  46401      0 --:--:-- --:--:-- --:--:-- 47071
    patching file config_pages.module
    patching file 'src/Command/GetValueCommand.php'
    patching file 'src/Command/SetValueCommand.php'
    patching file 'src/ConfigPagesAccessControlHandler.php'
    patching file 'src/ConfigPagesContextBase.php'
    patching file 'src/ConfigPagesContextManager.php'
    patching file 'src/ConfigPagesForm.php'
    patching file 'src/ConfigPagesListBuilder.php'
    patching file 'src/ConfigPagesPermissions.php'
    patching file 'src/ConfigPagesTypeForm.php'
    patching file 'src/ConfigPagesTypeListBuilder.php'
    patching file 'src/Controller/ConfigPagesController.php'
    patching file 'src/Entity/ConfigPages.php'
    patching file 'src/Entity/ConfigPagesType.php'
    patching file 'src/Form/ConfigPagesClearConfirmationForm.php'
    patching file 'src/Plugin/Block/ConfigPagesBlock.php'
    patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php'
    1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej'
    patching file 'tests/src/Functional/ClearConfigPageTest.php'
    patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php'
    โžœ  config_pages git:(master) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages 
    
    FILE: ...rojects/d9/d9-local/web/modules/contrib/config_pages/config_pages.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: ...dules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     217 | WARNING | Unused variable $cp_type.
     217 | WARNING | Unused variable $data_type.
    --------------------------------------------------------------------------------
    
    
    FILE: .../web/modules/contrib/config_pages/src/Controller/ConfigPagesController.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     169 | WARNING | \Drupal calls should be avoided in classes, use dependency
         |         | injection instead
    --------------------------------------------------------------------------------
    
    
    FILE: ...s/d9/d9-local/web/modules/contrib/config_pages/src/ConfigPagesTypeForm.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     118 | WARNING | \Drupal calls should be avoided in classes, use dependency
         |         | injection instead
    --------------------------------------------------------------------------------
    
    Time: 858ms; Memory: 12MB
    
    โžœ  contrib git:(master) โœ— 
    
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zkhan.aamir

    Issue summary updated.

  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    7 pass
  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Fixed the remaining issues. Please review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Yashaswi18

    Hello, I checked out to the branch '3424331-fix-the-issues' and ran the command phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml.

    Found no errors or warnings remaining.

  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Hi sakthi_dev,

    I reviewed MR!36, and the MR is not applied cleanly I tried git apply -v and patch -p1 but I'm getting the error shown below:

    jetherparadero@PrometSources-MacBook-Pro config_pages % curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 29496    0 29496    0     0  39377      0 --:--:-- --:--:-- --:--:-- 39698
    patching file config_pages.module
    patching file 'src/Command/GetValueCommand.php'
    patching file 'src/Command/SetValueCommand.php'
    patching file 'src/ConfigPagesAccessControlHandler.php'
    patching file 'src/ConfigPagesContextBase.php'
    patching file 'src/ConfigPagesContextManager.php'
    patching file 'src/ConfigPagesForm.php'
    patching file 'src/ConfigPagesListBuilder.php'
    patching file 'src/ConfigPagesPermissions.php'
    patching file 'src/ConfigPagesTypeForm.php'
    patching file 'src/ConfigPagesTypeListBuilder.php'
    patching file 'src/Controller/ConfigPagesController.php'
    patching file 'src/Entity/ConfigPages.php'
    patching file 'src/Entity/ConfigPagesType.php'
    patching file 'src/Form/ConfigPagesClearConfirmationForm.php'
    patching file 'src/Plugin/Block/ConfigPagesBlock.php'
    patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php'
    1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej'
    patching file 'tests/src/Functional/ClearConfigPageTest.php'
    patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php'
    jetherparadero@PrometSources-MacBook-Pro config_pages % cd ..
    jetherparadero@PrometSources-MacBook-Pro contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------
     217 | WARNING | Unused variable $cp_type.
     217 | WARNING | Unused variable $data_type.
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 952ms; Memory: 12MB

    Kindly check and advise, please.
    Thank you.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    I couldn't find the variables in the file. Could you please reverify it once please?

  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chandansha

    I checked module i could not find any phpcs issue.
    below share image kindly check.
    @all Thanks for Review.

  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I apply the updated MR !36 into the module and it applied successfully, but when I try to execute the PHPCS command, I can also see the same phpcs issue that comment #9

    โžœ  config_pages git:(master) โœ— curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 29496    0 29496    0     0  28574      0 --:--:--  0:00:01 --:--:-- 28917
    patching file config_pages.module
    patching file 'src/Command/GetValueCommand.php'
    patching file 'src/Command/SetValueCommand.php'
    patching file 'src/ConfigPagesAccessControlHandler.php'
    patching file 'src/ConfigPagesContextBase.php'
    patching file 'src/ConfigPagesContextManager.php'
    patching file 'src/ConfigPagesForm.php'
    patching file 'src/ConfigPagesListBuilder.php'
    patching file 'src/ConfigPagesPermissions.php'
    patching file 'src/ConfigPagesTypeForm.php'
    patching file 'src/ConfigPagesTypeListBuilder.php'
    patching file 'src/Controller/ConfigPagesController.php'
    patching file 'src/Entity/ConfigPages.php'
    patching file 'src/Entity/ConfigPagesType.php'
    patching file 'src/Form/ConfigPagesClearConfirmationForm.php'
    patching file 'src/Plugin/Block/ConfigPagesBlock.php'
    patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php'
    1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej'
    patching file 'tests/src/Functional/ClearConfigPageTest.php'
    patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php'
    โžœ  config_pages git:(master) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
    ERROR: You must supply at least one file or directory to process.
    
    Run "phpcs --help" for usage information
    
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages 
    
    FILE: ...rojects/d9/d9-local/web/modules/contrib/config_pages/config_pages.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: ...dules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     217 | WARNING | Unused variable $cp_type.
     217 | WARNING | Unused variable $data_type.
    --------------------------------------------------------------------------------
    
    Time: 872ms; Memory: 12MB
    
    โžœ  contrib git:(master) โœ— 
    
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia mohd sahzad

    Mohd Sahzad โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia mohd sahzad

    Mohd Sahzad โ†’ changed the visibility of the branch 3424331-fix-phpcs to hidden.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 6 months ago
    7 pass
  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Hi, I have fixed below remaining phpcs issue. Please review.

    modules/custom/config_pages
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesForm.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 9 LINES
    ---------------------------------------------------------------------------------------------------------------------------
     91 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     92 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     93 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     94 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     95 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     96 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     97 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     98 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     99 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
    ---------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/Controller/ConfigPagesController.php
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 5 LINES
    --------------------------------------------------------------------------------------------------------------------------------------------
     83 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     84 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     85 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     86 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     87 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     87 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    --------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/Plugin/Block/ConfigPagesBlock.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
     47 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesTypeForm.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 4 LINES
    -------------------------------------------------------------------------------------------------------------------------------
     65 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     66 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     67 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     68 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     68 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesListBuilder.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 7 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
     46 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     47 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 40
     47 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     61 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     62 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     63 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     64 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     65 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     65 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    ----------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesTypeListBuilder.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------------------------
     39 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     40 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     41 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     41 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    --------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 667ms; Memory: 12MB
    
  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akashpj

    Hi, Iโ€™ve reviwed MR 36 on Drupal 10.2.x.
    The MR applied cleanly.

    Few phpcs issues fixed but I still can see the below issues

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/config_pages
    
    FILE: /Users/apj/projects/doc102/drupal/modules/contrib/config_pages/config_pages.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: /Users/apj/projects/doc102/drupal/modules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------
     217 | WARNING | Unused variable $cp_type.
     217 | WARNING | Unused variable $data_type.
    ----------------------------------------------------------------------------------------------------------------------------------
    

    Changing the status back to "Needs work".

    Thanks

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

    Hi,
    After applying the MR, I have not found any issues in the ConfigPagesValueAccess.php file.

    Here is the command I used to run PHP CodeSniffer:

    addweb@addweb-HP-ZBook-15-G2:~$ .config/composer/vendor/squizlabs/php_codesniffer/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js Drupal8-vagrant/web/web/contribution/lando-d10/web/modules/custom/config_pages/
    addweb@addweb-HP-ZBook-15-G2:~$ 

    To avoid issues with the info file, please download the module through:
    git clone repo-url

    Move to "Need review" so other users can review as well.

Production build 0.71.5 2024