Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml shows the following warnings/errors which should be fixed.
FILE: ./css/galleryslider.css
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
19 | ERROR | [x] Spaces must be used for alignment; tabs are not
| | allowed
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./galleryslider.module
----------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 10 LINES
----------------------------------------------------------------------
13 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
13 | ERROR | [ ] Missing parameter comment
13 | ERROR | [ ] Missing parameter type
14 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
14 | ERROR | [ ] Missing parameter comment
16 | WARNING | [ ] Hook implementations should not duplicate
| | @return documentation
16 | ERROR | [ ] Description for the @return value is missing
49 | ERROR | [ ] Missing parameter comment
49 | ERROR | [ ] Missing parameter type
96 | ERROR | [ ] Missing parameter comment
96 | ERROR | [ ] Missing parameter type
109 | ERROR | [ ] Missing parameter comment
111 | ERROR | [ ] Description for the @return value is missing
122 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
128 | ERROR | [ ] Missing parameter comment
128 | ERROR | [ ] Missing parameter type
130 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/Field/FieldFormatter/GallerySliderFieldFormatter.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
34 | ERROR | [ ] Missing member variable doc comment
35 | ERROR | [ ] Missing member variable doc comment
163 | WARNING | [x] 'TODO: Implement settings summary.' should match
| | the format '@todo Fix problem X here.'
169 | ERROR | [x] There must be exactly one blank line before the
| | tags in a doc comment
232 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/views/style/GallerySlider.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
55 | ERROR | [ ] Missing parameter comment
55 | ERROR | [ ] Missing parameter type
56 | ERROR | [ ] Missing parameter comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Comments
Comment #2
nitesh624Working on it will update by today.
Comment #3
nitesh624Fixed the PHPCS error.
Comment #4
meghasharma commentedafter applied #3 patch,
patch not fixed all the errors ,still there are some Drupal coding standard errors which needs to to be fixed.
Comment #5
meghasharma commentedComment #6
nitesh624Will work on this and update
Comment #7
nitesh624Comment #8
meghasharma commentedComment #9
meghasharma commentedafter applied #7 patch, patch Fixed all the errors
It looks good to me..
marking as RTBC
Comment #10
avpadernoComment #11
avpadernoSince the parameter is
$keyand it is a string, probably the default keys (plural) is not correct. It is not even the default key.The function does not always return an array. That needs to be made clear.
If it is
mixed, it is not an array.Spaces inside a regular expression are wrong, except in the case they are part of the regular expression, which does not seem in this case.
Lines are indented by two spaces.
The line was already correctly indented (two spaces).
Comment #12
imustakim commentedWorking on this.
Comment #13
imustakim commentedAdded a patch.
Please review.
Comment #14
avpadernoThe patch does not resolve all the reported issues. Actually, the patch is for a different module.
Comment #15
imustakim commentedSorry for the last patch.
Here's the correct one.
Comment #16
imustakim commentedComment #17
avpadernoComment #19
chaitanyadessai commentedFixed issues reported by phpcs.
Comment #20
arpitk commentedHi I reviewed the patch #19 it applied cleanly. No more errors/warnings are produced. I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig . to test on version 8.x-3.x-dev and drupal 9.5.9
Thanks!

Comment #21
thakurnishant_06 commentedHello Folks !!
Created a patch for galleryslider 8.x-3.x-dev . The patch seems to fix the phpcs issues.
Can someone please review the patch.
Thank you for your support!!!
Comment #22
Anmol_Specbee commentedThe patch#20 mentioned in the comment#21 is working and is resolving all the issues.
Comment #23
thakurnishant_06 commented@Anmol_Specbee , thanks for confirmation :)
Comment #24
avpadernoA module file needs to contain that comment, but the description given there is Hook implementations for the Gallery Slider for Multiple Images module. (assuming that the module name shown in the .info.yml file is Gallery Slider for Multiple Images).
Removing the hook implementations from that file to add a class (which should not be placed in a .module file) is blatantly wrong.
Comment #25
thakurnishant_06 commentedhello @apaderno, hope you are doing well.
updated the patch addressed #24 issues.
kindly review the updated patch.
Thank you for your support.
Comment #26
avpadernoI take the patch is created from the wrong files, since the first lines from the galleryslider.module are the following one.
Comment #27
akashkumar07 commentedThis patch addresses the #11 changes. Please review.
Thanks!
Comment #28
akashkumar07 commentedComment #30
zkhan.aamir commentedHi,
Patch #27 applied successfully.
All the issue resolved.
Comment #31
nisha_j commentedHi, patch #27 applied cleanly but it not fixes all the phpcs issues.
Comment #32
avpadernoComment #37
roberttabigue commentedHi,
I have applied the latest MR !4 to the Gallery Slider for Multiple Images module with 8.x-3.x-dev and confirmed all PHPCS errors have been fixed. Please see the attached file for reference.
However, when I reran the PHPCS in the GitLab CI pipeline, the jobs failed to pass.
Please refer to this link: https://git.drupalcode.org/issue/galleryslider-3161596/-/jobs/4152058
I'm moving this to 'Needs work' for now.
Thank you.
Comment #38
ishfaqafridi85 commentedI'll review MR !4 and check the PHPCS failure reported in #37.
I'll first try to reproduce the invalid ruleset error and check whether any coding standards issues remain.
Comment #39
ishfaqafridi85 commentedUpdated MR !4 and rebased it onto the latest 8.x-3.x.
Added a project PHPCS ruleset, excluded the CI-generated version file, wrapped long README lines, and restored the required StylePluginBase import.
The PHPCS job now passes with zero errors or warnings. PHPStan, ESLint, Stylelint and CSpell still fail in the pipeline and need separate attention.
Please review the PHPCS changes.
Comment #40
ishfaqafridi85 commentedIn MR !4, the PHPCS issues appear to be resolved
Comment #42
ishfaqafridi85 commentedComment #44
riazsaid15 commentedThank you for supporting the issue, let me merge the code, and close the issue.