Hi @Graber
I ran Check Drupal coding standards and I use Drupal Check code, you can review and fix it.
$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/group_clone
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Annotation\GroupContentCloner.php
------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
11 | ERROR | [x] Doc comment long description must end with a full stop
19 | ERROR | [ ] Missing @var tag in member variable comment
26 | ERROR | [ ] Missing @var tag in member variable comment
31 | ERROR | [ ] Missing @var tag in member variable comment
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Entity\GroupCloneSettings.php
--------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
30 | ERROR | [ ] Missing @var tag in member variable comment
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\EntityCloneTrait.php
-----------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
14 | ERROR | [x] Missing trait doc comment
18 | ERROR | [x] Whitespace found at end of line
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Form\GroupCloneForm.php
--------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | WARNING | [x] Unused use statement
14 | ERROR | [x] Missing class doc comment
18 | ERROR | [ ] Missing member variable doc comment
19 | ERROR | [ ] Missing member variable doc comment
20 | ERROR | [ ] Missing member variable doc comment
67 | ERROR | [x] Expected 1 space before "instanceof"; 2 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Form\GroupCloneFormTrait.php
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
11 | ERROR | [x] Missing trait doc comment
13 | ERROR | [ ] Missing member variable doc comment
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Form\GroupCloneSettingsForm.php
----------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
13 | ERROR | [x] Missing class doc comment
17 | ERROR | [ ] Missing member variable doc comment
18 | ERROR | [ ] Missing member variable doc comment
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\GroupCloner.php
----------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 1 WARNING AFFECTING 16 LINES
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | WARNING | [x] Unused use statement
16 | ERROR | [x] Missing class doc comment
23 | ERROR | [ ] Missing member variable doc comment
24 | ERROR | [ ] Missing member variable doc comment
25 | ERROR | [ ] Missing member variable doc comment
46 | ERROR | [x] Data types in @var tags need to be fully namespaced
62 | ERROR | [ ] Missing @var tag in member variable comment
67 | ERROR | [ ] Missing @var tag in member variable comment
98 | ERROR | [ ] Parameter $group is not described in comment
101 | ERROR | [ ] Missing parameter comment
103 | ERROR | [ ] Expected type hint "array"; found "?array" for $settings
123 | ERROR | [x] Missing function doc comment
127 | ERROR | [x] Missing function doc comment
134 | ERROR | [x] Expected "GroupInterface" but found "?GroupInterface" for function return type
304 | ERROR | [x] Expected "throwable" but found "?throwable" for parameter type
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\GroupClonerBatch.php
-----------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
12 | ERROR | [x] Missing class doc comment
35 | ERROR | [ ] Missing parameter comment
37 | ERROR | [ ] Description for the @return value is missing
134 | ERROR | [ ] Missing parameter comment
136 | ERROR | [ ] Description for the @return value is missing
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\GroupContentClonerManager.php
--------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
9 | ERROR | [x] Missing class doc comment
27 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Plugin\GroupContentCloner\DefaultGroupContentCloner.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Plugin\GroupContentCloner\GroupContentClonerBase.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | ERROR | [x] Missing class doc comment
16 | ERROR | [ ] Missing member variable doc comment
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Plugin\GroupContentCloner\GroupContentClonerInterface.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | ERROR | [x] Missing interface doc comment
9 | ERROR | [ ] Parameter $group_content is not described in comment
9 | ERROR | [ ] Parameter $group_clone_id is not described in comment
9 | ERROR | [ ] Parameter $cloned_entity_ids is not described in comment
13 | ERROR | [ ] Parameter comment must start with a capital letter
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\src\Routing\RouteSubscriber.php
------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | ERROR | [x] Missing class doc comment
14 | ERROR | [ ] Missing member variable doc comment
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\group_clone\tests\src\Kernel\GroupClonerServiceTest.php
------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
20 | ERROR | [ ] Missing member variable doc comment
38 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------
Time: 445ms; Memory: 10MB
Comments
Comment #2
graber commentedThank you for reporting this, do you have a patch that you could upload?
Comment #3
LuongGiap commentedHi @Graber
I'm sorry, I don't have patch for issue.
Comment #4
urvashi_vora commentedComment #5
urvashi_vora commentedHi,
Please review this patch.
Comment #6
graber commentedThose @inheritdoc comments don't mean much since there's no interface but I don't care TBH as long as coder doesn't yell.
Thanks!
Comment #8
graber commented