Problem/Motivation

Found these phpcs error

FILE: /update_helper/tests/src/Functional/DrushTest.php
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
 112 | ERROR | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------


FILE: /update_helper/tests/src/Kernel/UpdaterTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 268 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /update_helper/modules/update_helper_checklist/update_helper_checklist.module
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
 7 | WARNING | [x] 'TODO:' should match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------


FILE: /update_helper/modules/update_helper_checklist/tests/modules/update_helper_checklist_test/update_helper_checklist_test.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: /update_helper/modules/update_helper_checklist/tests/src/Functional/UpdateHelperChecklistToolbarTest.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
 22 | WARNING | [x] A comma should follow the last multiline array item. Found: 'test_page_test'
 43 | ERROR   | [ ] The array declaration extends to column 120 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------


FILE: /update_helper/modules/update_helper_checklist/drush.services.yml
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 3 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: /update_helper/modules/update_helper_checklist/update_helper_checklist.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:/update_helper/modules/update_helper_checklist/update_helper_checklist.install
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------
 16 | WARNING | [x] 'TODO: Improve - Get information from executed update hooks, what to mark.' should match the format '@todo Fix problem X here.'
 60 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /update_helper/modules/update_helper_checklist/src/UpdateChecklist.php
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 14 | WARNING | [x] 'TODO: Need tests and a lot!' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /update_helper/update_helper.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: /update_helper/src/ReversibleConfigDiffer.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
 14 | WARNING | [x] 'TODO:' should match the format '@todo Fix problem X here.'
 44 | ERROR   | [ ] The array declaration extends to column 146 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------


FILE: /update_helper/src/ConfigExporter.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
 11 | WARNING | [x] 'TODO:' should match the format '@todo Fix problem X here.'
 58 | WARNING | [x] 'TODO: It would be good to log that file has been changed!!!' should match the format '@todo Fix problem X here.'
 73 | ERROR   | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------


FILE: /update_helper/src/Generators/ConfigurationUpdate.php
--------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------
 113 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 116 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 117 | ERROR   | [x] Concat operator must be surrounded by a single space
 126 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: /update_helper/src/ConfigHandler.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
 15 | WARNING | [x] 'TODO: Create UpdateDefinition class to handle configuration update entry.' should match the format '@todo Fix problem X here.'
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

run this command in this module folder phpcs --standard="Drupal,DrupalPractice" --extensions="php,module,inc,install,test,profile,theme,css,info,txt,yml"

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

TanujJain-TJ created an issue. See original summary.

tanuj.’s picture

StatusFileSize
new11.08 KB

Fixed above mentioned phpcs errors in this patch, ignoring .yml file phpcs issues for following errors

 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

Please review

tanuj.’s picture

Assigned: tanuj. » Unassigned
Status: Active » Needs review
avpaderno’s picture

Title: Drupal Coding Standard Issues | phpcs » Fix the issues reported by phpcs
Category: Bug report » Task
Priority: Minor » Normal
akram khan’s picture

Status: Needs review » Needs work
StatusFileSize
new1001.05 KB

After applying patch #2 still some issue are there. Added SS for reference

akram khan’s picture

Status: Needs work » Needs review
StatusFileSize
new23.7 KB
new12.52 KB

Added updated patch it's remove all PHPCS issue now

Status: Needs review » Needs work

The last submitted patch, 6: 3343217-6.patch, failed testing. View results

vishaljd made their first commit to this issue’s fork.

vishaljd’s picture

Assigned: Unassigned » vishaljd

vishaljd’s picture

Assigned: vishaljd » Unassigned
Status: Needs work » Needs review
vishaljd’s picture

hardikpandya made their first commit to this issue’s fork.

avpaderno’s picture

Priority: Normal » Minor
Issue tags: +Coding standards
alexpott’s picture

Version: 3.0.x-dev » 4.0.x-dev

I've enabled gitlabci on 4.0.x let's fix this there and only what is being reported by gitlabci.

alexpott’s picture

Status: Needs review » Fixed

The gitlabci pipeline is green!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.