Problem/Motivation

FILE: /Users/projects/drupal-d10/modules/contrib/image_style_quality/tests/src/Kernel/ImageStyleQualityTest.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
 25 | ERROR | Missing member variable doc comment
 26 | ERROR | Missing member variable doc comment
----------------------------------------------------------------------------------------------------------------------


FILE: /Users/projects/drupal-d10/modules/contrib/image_style_quality/README.txt
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------
 25 | WARNING | [ ] Line exceeds 80 characters; contains 136 characters
 35 | ERROR   | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: /Users/projects/drupal-d10/modules/contrib/image_style_quality/src/Plugin/ImageEffect/ImageStyleQualityImageEffect.php
----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
 23 | ERROR | [ ] Missing member variable doc comment
 24 | ERROR | [ ] Missing member variable doc comment
 30 | ERROR | [x] Expected 1 blank line before function; 2 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /Users/projects/drupal-d10/modules/contrib/image_style_quality/src/MutableQualityToolkitManager.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
 15 | ERROR | Missing member variable doc comment
 16 | ERROR | Missing member variable doc comment
----------------------------------------------------------------------------------------------------------------------
Time: 101ms; Memory: 10MB

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#7 3347132-before-patch.txt2.97 KBnayana_mvr
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

Rashmisoni created an issue. See original summary.

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

kunal_sahu’s picture

Assigned: Unassigned » kunal_sahu
kunal_sahu’s picture

Hi i could reproduce the issue. Got these coding standard issues .

kunal@LAPTOP-G4FTKS5H MINGW64 /c/xampp/htdocs/contributions
$ vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/image_style_quality-3347132/
FILE: ...s\contributions\web\modules\contrib\image_style_quality-3347132\README.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 25 | WARNING | [ ] Line exceeds 80 characters; contains 136 characters
 35 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...s\contrib\image_style_quality-3347132\src\MutableQualityToolkitManager.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 15 | ERROR | [ ] Missing member variable doc comment
 16 | ERROR | [ ] Missing member variable doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...\image_style_quality-3347132\src\MutableQualityToolkitManagerInterface.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...le_quality-3347132\src\Plugin\ImageEffect\ImageStyleQualityImageEffect.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 23 | ERROR | [ ] Missing member variable doc comment
 24 | ERROR | [ ] Missing member variable doc comment
 30 | ERROR | [x] Expected 1 blank line before function; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...rib\image_style_quality-3347132\tests\src\Kernel\ImageStyleQualityTest.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 25 | ERROR | [ ] Missing member variable doc comment
 26 | ERROR | [ ] Missing member variable doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 3.08 secs; Memory: 10MB

Will create an MR to fix these issues.

Thanks

kunal_sahu’s picture

Assigned: kunal_sahu » Unassigned
Status: Needs work » Needs review

Hi I have fixed all the issues related to Coding standards .

kunal@LAPTOP-G4FTKS5H MINGW64 /c/xampp/htdocs/contributions
$ vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/image_style_quality-3347132/

kunal@LAPTOP-G4FTKS5H MINGW64 /c/xampp/htdocs/contributions
$ vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/image_style_quality-3347132/

No fixable errors were found

Time: 136ms; Memory: 10MB

Please review and merge this MR. Thanks

nayana_mvr’s picture

StatusFileSize
new2.97 KB

Verified the MR!2 on Drupal version 10.1.x. Patch applied cleanly All the coding standard errors mentioned in the ticket are fixed now.

a.aaronjake’s picture

Status: Needs review » Needs work

Hi @kunal_sahu,

Applied the changes you committed on MR!2, it was applied successfully, however there are still few errors reported. Please see below:

➜  image_style_quality git:(main) ✗ curl https://git.drupalcode.org/project/image_style_quality/-/merge_requests/2.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4275    0  4275    0     0  14507      0 --:--:-- --:--:-- --:--:-- 15159
patching file README.txt
patching file src/MutableQualityToolkitManager.php
patching file src/Plugin/ImageEffect/ImageStyleQualityImageEffect.php
patching file tests/src/Kernel/ImageStyleQualityTest.php
➜  image_style_quality git:(main) ✗ ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig image_style_quality

FILE: /Users/PrometInterns/Demo-site/drupal-orgissue/web/modules/contrib/image_style_quality/README.txt
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 36 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: /Users/PrometInterns/Demo-site/drupal-orgissue/web/modules/contrib/image_style_quality/src/Plugin/ImageEffect/ImageStyleQualityImageEffect.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
 8 | 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
----------------------------------------------------------------------------------------------------------------------------------------------------

Time: 182ms; Memory: 10MB

Kindly check

Thanks,
Jake

heddn’s picture

Version: 8.x-1.5 » 8.x-1.x-dev
Status: Needs work » Closed (duplicate)
Related issues: +#3485954: Gitlab CI yml

This got fixed when #3485954: Gitlab CI yml got merged.