Problem/Motivation
Need to resolve below Drupal coding standard issues.
FILE: /Users/arunkumar/Contribution/domain_entity/tests/src/Functional/DomainEntitySourceUrlsTest.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 3 WARNINGS AFFECTING 15 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
20 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
36 | WARNING | [x] A comma should follow the last multiline array item. Found: 'taxonomy'
63 | ERROR | [ ] Missing short description in doc comment
66 | ERROR | [ ] Class property $source_mapper should use lowerCamel naming without underscores
68 | ERROR | [ ] Missing short description in doc comment
71 | ERROR | [ ] Class property $domain_storage should use lowerCamel naming without underscores
73 | ERROR | [ ] Missing short description in doc comment
76 | ERROR | [ ] Class property $domain_source_id should use lowerCamel naming without underscores
95 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
104 | ERROR | [ ] Missing parameter comment
106 | ERROR | [ ] Description for the @return value is missing
115 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
140 | ERROR | [x] Expected 1 blank line after function; 2 found
144 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
186 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/HttpKernel/DomainEntitySourcePathProcessor.php
----------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------
93 | ERROR | [ ] Missing short description in doc comment
110 | ERROR | [x] Parameter comment must end with a full stop
147 | ERROR | [x] Perl-style comments are not allowed; use "// Comment" instead
198 | ERROR | [x] Expected 1 blank line after function; 2 found
270 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/Form/DomainEntityUi.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
109 | WARNING | [x] '@Todo Port active domain UI effects.' should match the format '@todo Fix problem X here.'
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/Form/DomainEntitySettings.php
--------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------
64 | ERROR | [ ] Parameter $source_mapper is not described in comment
185 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
226 | ERROR | [x] Array closing indentation error, expected 10 spaces but found 12
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/DomainEntitySourceMapper.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
34 | WARNING | [x] '@Todo Add better naming for entities without bundles.' should match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/DomainEntityMapper.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
144 | WARNING | [x] '@Todo Add better naming for entities without bundles.' should match the format '@todo Fix problem X here.'
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/DomainEntityPermissions.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------
56 | ERROR | The array declaration extends to column 166 (the limit is 80). The array content should be split up over multiple lines
59 | ERROR | The array declaration extends to column 164 (the limit is 80). The array content should be split up over multiple lines
62 | ERROR | The array declaration extends to column 166 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/arunkumar/Contribution/domain_entity/src/EventSubscriber/DomainEntitySourceRedirectResponseSubscriber.php
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
54 | ERROR | [x] Expected newline after closing brace
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
Time: 206ms; Memory: 10MB
Steps to reproduce
phpcs --standard=Drupal domain_entity
phpcs --standard=DrupalPractice domain_entity
Proposed resolution
Resolve all coding standard issues.
Remaining tasks
Nil
User interface changes
Nil
API changes
Nil
Data model changes
Nil
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | interdiff_24-27.txt | 22.24 KB | jatingupta40 |
| #27 | updated-3295668-27.patch | 23.96 KB | jatingupta40 |
| #26 | Screenshot from 2022-07-25 18-15-35.png | 44.44 KB | jatingupta40 |
| #24 | interdiff_21-24.txt | 2.18 KB | alanmoreira |
| #24 | 3295668-24.patch | 23.37 KB | alanmoreira |
Issue fork domain_entity-3295668
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:
- 3295668-drupal-coding-standard
changes, plain diff MR !9
Comments
Comment #2
atul_ghate commentedHi.
I will work on that issue
Comment #3
atul_ghate commentedHello,
Please review the patch I have created for the above mentioned coding standard issues.
Comment #4
jatingupta40 commentedI will review this patch.
Comment #5
jatingupta40 commentedThe patch is working absolutely fine. No remaining errors.
Thanks
Comment #6
delta commentedquick glance, php docs are updated, not variables
not sure whats the point here
but if you want to finalize that patch I'm happy to merge it when its ready
Comment #7
delta commentedComment #8
mrinalini9 commentedUpdated patch #3 by addressing #6, please review it.
Comment #9
sourabhjainI will review it.
Comment #10
sourabhjainI have reviewed the patch and found the below errors:
Fixed the above issues. Please review.
Comment #11
Shubham Sharma 77 commentedCoding standard issues have been resolved. Move this ticket to RTBC.
Comment #12
jatingupta40 commented@sourabhjain
Why this extra semicolon is there ? Is it needed ?
Comment #13
delta commentedsee #12
and snake case variables doesn't need to be changed to camel case, see https://www.drupal.org/node/318#s-functions-and-variables
Comment #14
nitin_lama@JatinGupta40 the extra semicolon is being removed by the patch #10.
Comment #15
sourabhjainRemoved the extra semicolon as mentioned in #12.
Comment #16
shamir.vs commentedPatch #15 applied successfully and all coding standard issue is fixed
Comment #17
jatingupta40 commented@nitin_lama Thanks for replying.
@sourabhjain Thanks for replying and making the correction.
Regards.
Comment #18
delta commentedhttps://www.drupal.org/node/318#s-functions-and-variables
do not mix camelCase and snake_case variable naming inside a file.
there is no reason to change the case style.
The patch change some variable to camelCase and break coding standards by mixing case.
please revert the case style changes.
Comment #19
nitin_lamaPatch failed to apply. #15

Comment #20
alanmoreira commentedI'll try to re-roll patch #15
Comment #21
jatingupta40 commented@alanmoreira Please also try to solve the issue suggested in comment #18
Thanks and regards.
Comment #22
alanmoreira commentedI rerolled the patch and fixed the remaining phpcs errors. Changing status to "Needs review" =)
Comment #24
alanmoreira commented@JatinGupta40 , I just saw your comment right after i posted the #22 comment. Fixing what is asked in #18. Please review it :)
Comment #25
jatingupta40 commented@alanmoreira
Thanks for the reply, i will review you patch.
Comment #26
jatingupta40 commentedWhile reviewing the patch provided at #24, it resolves all the suggestion suggested in comment #18, but got 2 coding standard issues.
Working on it will soon provide an updated patch.
Thanks
Comment #27
jatingupta40 commentedProviding an updated patch.
Please review.
Thanks.
Comment #28
atul_ghate commentedHi,
i will review this patch.
Comment #29
atul_ghate commented#27 resolves all coding standards issues and patch applies cleanly, moving to RTBC.
Comment #31
delta commentedthank you all
Comment #32
sourabhjain