Problem/Motivation
After running the phpcs command on the module it gives the following warnings:
FILE: /app/modules/contrib/auctioneer/css/auction.form.css
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
21 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found
| | 2
22 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found
| | 2
75 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found
| | 2
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/auctioneer/src/Form/AuctionForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
18 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...p/modules/contrib/auctioneer/src/AuctionTypeManagerInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
17 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...ntrib/auctioneer/src/Plugin/Field/FieldType/AuctioneerNumber.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
96 | ERROR | The array declaration extends to column 145 (the limit
| | is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------
FILE: .../modules/contrib/auctioneer/src/AuctionFieldManagerInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...modules/contrib/auctioneer/src/BidBundleAccessControlHandler.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
19 | WARNING | [x] '@TODO: Block deleting if it's marked as winner'
| | should match the format '@todo Fix problem X
| | here.'
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/auctioneer/src/BidPermissions.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/auctioneer/src/AuctionTypeManager.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
245 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
259 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...e_range/src/Plugin/Auctioneer/AuctionType/AuctionTypeDefault.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
17 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 1
107 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
109 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
111 | ERROR | [ ] The array declaration extends to column 109 (the
| | limit is 80). The array content should be split
| | up over multiple lines
122 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
124 | WARNING | [x] Inline @var declarations should use the /** */
| | delimiters
147 | ERROR | [x] list(...) is forbidden, use [...] instead.
147 | ERROR | [ ] The array declaration extends to column 97 (the
| | limit is 80). The array content should be split
| | up over multiple lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/auctioneer_datetime_range/src/Batch/CheckAuctionDatesBatch.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...uctioneer_sniper/src/Event/RequestAuctionLifetimeUpdateEvent.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
26 | ERROR | Missing @var tag in member variable comment
----------------------------------------------------------------------
FILE: .../modules/auctioneer_sniper/src/AuctionSniperManagerInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...ules/auctioneer_commerce/src/AuctionCommerceManagerInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...uctioneer/modules/auctioneer_commerce/auctioneer_commerce.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
155 | ERROR | The array declaration extends to column 165 (the limit
| | is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------
Steps to reproduce
Run PHPCS command on module.
Proposed resolution
Change the code as per coding standards.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | after-patch.png | 101.44 KB | sourabhjain |
| #16 | interdiff_12-16.txt | 868 bytes | sourabhjain |
| #16 | 3299862-16.patch | 11.29 KB | sourabhjain |
| #12 | interdiff_4-12.txt | 645 bytes | alanmoreira |
| #12 | 3299862-12.patch | 11.13 KB | alanmoreira |
Issue fork auctioneer-3299862
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:
- 3299862-drupal-coding-standards
changes, plain diff MR !1
Comments
Comment #2
meeni_dhobale commentedCoding standards issues is solved.
Comment #3
meeni_dhobale commentedComment #4
jonas-gerosa361Hi there, the patch looks good to me but if I ran the PHPCS I was still seeing some errors. Hope this patch solves it.
Kind regards,
Comment #5
waspper commentedPlease, check patch against latest development codebase. I got some issues:
Comment #6
waspper commentedComment #8
jonas-gerosa361Hello, thanks for the input I created the PR https://git.drupalcode.org/project/auctioneer/-/merge_requests/1 appreciate reviewers.
Thanks!
Comment #9
waspper commentedThanks @jonas-gerosa361 for contributing.
Tried to add your patch, but needed to fix/rebase. Can't merge. Can you check, please?
Also, it would be useful to attach patch here, too.
Comment #10
waspper commentedComment #11
alanmoreira commentedI'll work on this =)
Comment #12
alanmoreira commentedTried to reroll the patch. There are still 3 phpcs warnings that I could not fix.
Comment #14
waspper commented@alanmoreira Thanks for fixing. It works, but as I see in your PHPCS.txt, still pending a weird one telling about an unused variable. But that variable is of course being used. Can you check by changing:
By
Maybe it could give a clue.
Comment #15
sourabhjainLet me check as suggested in #14
Comment #16
sourabhjainI have fixed the issue mentioned in #14.
Please review the changes.
Also checked the coding standard issues. Please check the attached Screenshot
Comment #17
sourabhjainComment #18
alanmoreira commentedI'll review patch #16
Comment #19
alanmoreira commentedPatch #16 looks good. Solved all phpcs errors and warnings. Changing status to "RTBC" =)
Comment #21
waspper commentedReviewed and commited to the latest development release. Thank you guys for your help.
Comment #22
waspper commentedComment #23
waspper commented