When we run the module on phpcs, following issues are reported.


FILE: /var/www/html/drupal-8.4.3/modules/give/give.module
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------
  59 | ERROR | [ ] If the line declaring an array spans longer than
     |       |     80 characters, each element should be broken into
     |       |     its own line
 154 | ERROR | [ ] Inline doc block comments are not allowed; use "/*
     |       |     Comment */" or "// Comment" instead
 197 | ERROR | [x] Namespaced classes/interfaces/traits should be
     |       |     referenced with use statements
 230 | ERROR | [ ] If the line declaring an array spans longer than
     |       |     80 characters, each element should be broken into
     |       |     its own line
 231 | ERROR | [ ] If the line declaring an array spans longer than
     |       |     80 characters, each element should be broken into
     |       |     its own line
 232 | ERROR | [ ] If the line declaring an array spans longer than
     |       |     80 characters, each element should be broken into
     |       |     its own line
 233 | ERROR | [ ] If the line declaring an array spans longer than
     |       |     80 characters, each element should be broken into
     |       |     its own line
 242 | ERROR | [x] Namespaced classes/interfaces/traits should be
     |       |     referenced with use statements
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...tml/drupal-8.4.3/modules/give/tests/src/Unit/MailHandlerTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 300 | ERROR | Type hint "array" missing for $recipients
 358 | ERROR | Type hint "array" missing for $recipients
----------------------------------------------------------------------


FILE: .../drupal-8.4.3/modules/give/tests/src/Functional/GiveTestBase.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  15 | ERROR | [x] Do not append variable name "$adminUser" to the
     |       |     type declaration in a member variable comment
 134 | ERROR | [ ] Parameter $recurring is not described in comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../drupal-8.4.3/modules/give/tests/src/Functional/DonationTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 165 | ERROR | [x] Functions must not contain multiple empty lines in
     |       |     a row; found 2 empty lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../drupal-8.4.3/modules/give/tests/src/Functional/SettingsTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 17 | ERROR | [x] Do not append variable name "$adminUser" to the
    |       |     type declaration in a member variable comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...-8.4.3/modules/give/tests/src/Functional/GiveViewBuilderTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found
    |       |     6
 92 | ERROR | [x] Object operator not indented correctly; expected 8
    |       |     spaces but found 6
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...al-8.4.3/modules/give/tests/modules/give_test/give_test.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added
   |         | by drupal.org packaging automatically
----------------------------------------------------------------------


FILE: ...les/give/tests/modules/give_test/src/GiveTestServiceProvider.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | [x] Missing class doc comment
 19 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...al-8.4.3/modules/give/tests/modules/give_test/src/GiveStripe.php
----------------------------------------------------------------------
FOUND 19 ERRORS AFFECTING 13 LINES
----------------------------------------------------------------------
  7 | ERROR | [x] Missing class doc comment
  7 | ERROR | [x] PHP keywords must be lowercase; expected
    |       |     "implements" but found "Implements"
 12 | ERROR | [ ] Missing parameter comment
 19 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 24 | ERROR | [ ] @throws comment must be on the next line
 26 | ERROR | [ ] Description for the @return value must be on the
    |       |     next line
 28 | ERROR | [ ] Type hint "array" missing for $plan_data
 39 | ERROR | [x] Separate the @param and @throws sections by a blank
    |       |     line.
 39 | ERROR | [ ] @throws comment must be on the next line
 40 | ERROR | [x] Separate the @throws and @return sections by a
    |       |     blank line.
 40 | ERROR | [ ] Description for the @return value is missing
 42 | ERROR | [ ] Type hint "array" missing for $donation_data
 49 | ERROR | [ ] Missing parameter comment
 49 | ERROR | [ ] Missing parameter type
 50 | ERROR | [x] Separate the @param and @throws sections by a blank
    |       |     line.
 50 | ERROR | [ ] @throws comment must be on the next line
 51 | ERROR | [x] Separate the @throws and @return sections by a
    |       |     blank line.
 51 | ERROR | [ ] Description for the @return value is missing
 57 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../html/drupal-8.4.3/modules/give/config/install/give.settings.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...les/give/src/Plugin/Field/FieldFormatter/RecurrenceFormatter.php
----------------------------------------------------------------------
FOUND 24 ERRORS AND 1 WARNING AFFECTING 21 LINES
----------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
 25 | ERROR   | [ ] Doc comment short description must start with a
    |         |     capital letter
 26 | ERROR   | [x] Doc comment star missing
 27 | ERROR   | [x] Doc comment star missing
 27 | ERROR   | [x] Doc comment short description must end with a
    |         |     full stop
 27 | ERROR   | [ ] Doc comment short description must be on a single
    |         |     line, further text should be a separate paragraph
 28 | ERROR   | [x] Doc comment star missing
 29 | ERROR   | [x] Doc comment star missing
 30 | ERROR   | [x] Doc comment star missing
 31 | ERROR   | [x] Doc comment star missing
 35 | ERROR   | [ ] Doc comment short description must start with a
    |         |     capital letter
 36 | ERROR   | [x] Doc comment star missing
 37 | ERROR   | [x] Doc comment star missing
 37 | ERROR   | [x] Doc comment short description must end with a
    |         |     full stop
 37 | ERROR   | [ ] Doc comment short description must be on a single
    |         |     line, further text should be a separate paragraph
 38 | ERROR   | [x] Doc comment star missing
 39 | ERROR   | [x] Doc comment star missing
 40 | ERROR   | [x] Doc comment star missing
 41 | ERROR   | [x] Doc comment star missing
 42 | ERROR   | [x] Doc comment star missing
 43 | ERROR   | [x] Doc comment star missing
 44 | ERROR   | [x] Doc comment star missing
 45 | ERROR   | [x] Doc comment star missing
 46 | ERROR   | [x] Doc comment star missing
 56 | ERROR   | [ ] Inline doc block comments are not allowed; use
    |         |     "/* Comment */" or "// Comment" instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...give/src/Plugin/Field/FieldFormatter/CentsToDollarsFormatter.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...var/www/html/drupal-8.4.3/modules/give/src/GiveFormInterface.php
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------
  57 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
  60 | ERROR | [x] Return comment indentation must be 3 spaces, found
     |       |     2 spaces
  80 | ERROR | [ ] Type hint "array" missing for $recipients
  84 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
  93 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 103 | ERROR | [x] Whitespace found at end of line
 104 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 114 | ERROR | [x] Expected "bool" but found "boolean" for parameter
     |       |     type
 124 | ERROR | [x] Expected "bool" but found "boolean" for function
     |       |     return type
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /var/www/html/drupal-8.4.3/modules/give/src/GiveStripe.php
----------------------------------------------------------------------
FOUND 35 ERRORS AFFECTING 15 LINES
----------------------------------------------------------------------
  5 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
  6 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
  7 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
  8 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
  9 | ERROR | [x] There must be one blank line after the last USE
    |       |     statement; 2 found;
  9 | ERROR | [x] When importing a class with "use", do not include a
    |       |     leading \
 12 | ERROR | [x] Missing class doc comment
 12 | ERROR | [x] PHP keywords must be lowercase; expected
    |       |     "implements" but found "Implements"
 42 | ERROR | [x] Expected newline after closing brace
 42 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 42 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 44 | ERROR | [x] Expected newline after closing brace
 44 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 44 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 52 | ERROR | [x] Expected newline after closing brace
 52 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 52 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 68 | ERROR | [x] Expected newline after closing brace
 68 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 68 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 70 | ERROR | [x] Expected newline after closing brace
 70 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 70 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 72 | ERROR | [x] Expected newline after closing brace
 72 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 72 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 88 | ERROR | [x] Expected newline after closing brace
 88 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 88 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 90 | ERROR | [x] Expected newline after closing brace
 90 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 90 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
 92 | ERROR | [x] Expected newline after closing brace
 92 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
 92 | ERROR | [x] Namespaced classes/interfaces/traits should be
    |       |     referenced with use statements
----------------------------------------------------------------------
PHPCBF CAN FIX THE 35 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../www/html/drupal-8.4.3/modules/give/src/MailHandlerInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 9 | ERROR | Doc comment short description must be on a single line,
   |       | further text should be a separate paragraph
----------------------------------------------------------------------


FILE: ...var/www/html/drupal-8.4.3/modules/give/src/DonationInterface.php
----------------------------------------------------------------------
FOUND 12 ERRORS AND 4 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------
  70 | ERROR   | [x] Expected "int" but found "integer" for function
     |         |     return type
  87 | ERROR   | [x] Parameter comment must end with a full stop
 105 | WARNING | [ ] Line exceeds 80 characters; contains 98
     |         |     characters
 112 | ERROR   | [ ] Missing parameter name
 123 | ERROR   | [x] Return type must not contain variable name
     |         |     "$count"
 132 | ERROR   | [x] Expected "int" but found "integer" for parameter
     |         |     type
 145 | ERROR   | [x] Return type must not contain variable name
     |         |     "$count"
 161 | ERROR   | [ ] Description for the @return value is missing
 166 | WARNING | [ ] Line exceeds 80 characters; contains 81
     |         |     characters
 170 | ERROR   | [ ] Description for the @return value is missing
 229 | WARNING | [ ] Line exceeds 80 characters; contains 82
     |         |     characters
 231 | ERROR   | [x] Expected "int" but found "integer" for function
     |         |     return type
 239 | ERROR   | [x] Expected "int" but found "integer" for parameter
     |         |     type
 342 | ERROR   | [x] Doc comment short description must be on the
     |         |     first line
 352 | ERROR   | [x] Parameter comment must be on the next line
 353 | WARNING | [ ] Line exceeds 80 characters; contains 90
     |         |     characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...html/drupal-8.4.3/modules/give/src/Form/Donation/PaymentForm.php
----------------------------------------------------------------------
FOUND 12 ERRORS AND 7 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
 185 | WARNING | [ ] Line exceeds 80 characters; contains 86
     |         |     characters
 185 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 205 | ERROR   | [x] Functions must not contain multiple empty lines
     |         |     in a row; found 2 empty lines
 221 | WARNING | [ ] Line exceeds 80 characters; contains 107
     |         |     characters
 221 | ERROR   | [x] Comments may not appear after statements
 271 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
 320 | ERROR   | [x] Expected newline after closing brace
 321 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
 326 | WARNING | [ ] Line exceeds 80 characters; contains 106
     |         |     characters
 326 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 343 | ERROR   | [x] Expected newline after closing brace
 347 | ERROR   | [x] Expected newline after closing brace
 348 | WARNING | [ ] Line exceeds 80 characters; contains 95
     |         |     characters
 349 | WARNING | [ ] Line exceeds 80 characters; contains 82
     |         |     characters
 351 | ERROR   | [x] Inline comments must start with a capital letter
 351 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 351 | ERROR   | [x] Comments may not appear after statements
 368 | ERROR   | [x] Expected newline after closing brace
 393 | ERROR   | [x] Closing parenthesis of array declaration must be
     |         |     on a new line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...tml/drupal-8.4.3/modules/give/src/Form/Donation/DonationForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
   6 | WARNING | [x] Unused use statement
 173 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...drupal-8.4.3/modules/give/src/Form/Donation/DonationEditForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 68 | ERROR | [x] Expected 1 space before "/"; 0 found
 68 | ERROR | [x] Expected 1 space after "/"; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...tml/drupal-8.4.3/modules/give/src/Form/GiveForm/GiveSettings.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 20 | ERROR | [x] Data types in @param tags need to be fully
    |       |     namespaced
 71 | ERROR | [x] Data types in @param tags need to be fully
    |       |     namespaced
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...r/www/html/drupal-8.4.3/modules/give/src/GiveStripeInterface.php
----------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------
  5 | ERROR | [x] Missing interface doc comment
  9 | ERROR | [ ] Missing parameter comment
 11 | ERROR | [x] Expected 1 blank line before function; 0 found
 14 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 19 | ERROR | [ ] @throws comment must be on the next line
 21 | ERROR | [ ] Description for the @return value must be on the
    |       |     next line
 23 | ERROR | [ ] Type hint "array" missing for $plan_data
 30 | ERROR | [x] Separate the @param and @throws sections by a blank
    |       |     line.
 30 | ERROR | [ ] @throws comment must be on the next line
 31 | ERROR | [x] Separate the @throws and @return sections by a
    |       |     blank line.
 31 | ERROR | [ ] Description for the @return value is missing
 33 | ERROR | [ ] Type hint "array" missing for $donation_data
 38 | ERROR | [ ] Missing parameter comment
 38 | ERROR | [ ] Missing parameter type
 39 | ERROR | [x] Separate the @param and @throws sections by a blank
    |       |     line.
 39 | ERROR | [ ] @throws comment must be on the next line
 40 | ERROR | [x] Separate the @throws and @return sections by a
    |       |     blank line.
 40 | ERROR | [ ] Description for the @return value is missing
 43 | ERROR | [x] Expected 1 newline at end of file; 0 found
 43 | ERROR | [x] The closing brace for the interface must have an
    |       |     empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /var/www/html/drupal-8.4.3/modules/give/src/Entity/Donation.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
 141 | ERROR | [x] Expected 1 space before "/"; 0 found
 141 | ERROR | [x] Expected 1 space after "/"; 0 found
 427 | ERROR | [ ] Missing parameter comment
 429 | ERROR | [ ] Type hint "\Drupal\give\GiveStripeInterface"
     |       |     missing for $give_stripe
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /var/www/html/drupal-8.4.3/modules/give/src/Entity/GiveForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 94 | ERROR | Doc comment short description must be on a single line,
    |       | further text should be a separate paragraph
----------------------------------------------------------------------


FILE: ...html/drupal-8.4.3/modules/give/src/Controller/GiveController.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 68 | ERROR | [x] Closing parenthesis of array declaration must be on
    |       |     a new line
 96 | ERROR | [ ] Parameter tags must be grouped together in a doc
    |       |     comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...r/www/html/drupal-8.4.3/modules/give/src/DonationViewBuilder.php
----------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 11 LINES
----------------------------------------------------------------------
 29 | WARNING | [ ] Possible useless method overriding detected
 34 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 6
 35 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 6
 36 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 6
 37 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 8
 38 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 10
 39 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 10
 40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 10
 41 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 8
 42 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
    |         |     found 6
 44 | ERROR   | [x] Line indented incorrectly; expected 5 spaces,
    |         |     found 4
----------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Comments

Venkatesh Rajan.J created an issue. See original summary.

venkatesh rajan.j’s picture

Issue summary: View changes
mlncn’s picture

Despite the new, interim, beta4 release, this is in active development.

Higher priority is tests, which will make blanket application of coding standards a lot safer.

ioana apetri’s picture

Assigned: Unassigned » ioana apetri

I work on this issue..

ioana apetri’s picture

Assigned: ioana apetri » Unassigned
Status: Active » Needs review

Here is the patch. I covered all the phpcs issues on coding standards. Please review. Thanks:)

ioana apetri’s picture

StatusFileSize
new36.11 KB

Here, sorry.

venkatesh rajan.j’s picture

Assigned: Unassigned » venkatesh rajan.j
venkatesh rajan.j’s picture

Assigned: venkatesh rajan.j » Unassigned
Status: Needs review » Needs work

@yo3o,

Still, there are few errors that need to be fixed


FILE: .../drupal-8.4.3/modules/give/tests/src/Functional/GiveTestBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 134 | ERROR | Parameter $recurring is not described in comment
----------------------------------------------------------------------


FILE: ...al-8.4.3/modules/give/tests/modules/give_test/src/GiveStripe.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
 34 | ERROR | Type hint "array" missing for $plan_data
 52 | ERROR | Type hint "array" missing for $donation_data
 59 | ERROR | Missing parameter type
----------------------------------------------------------------------


FILE: /var/www/html/drupal-8.4.3/modules/give/src/GiveStripe.php
----------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 10 LINES
----------------------------------------------------------------------
  5 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
  6 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
  7 | WARNING | [x] Unused use statement
  7 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
  8 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
  9 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
 10 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
 11 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
 12 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
 13 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
 14 | ERROR   | [x] When importing a class with "use", do not include
    |         |     a leading \
----------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...tml/drupal-8.4.3/modules/give/src/Form/GiveForm/GiveSettings.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 20 | ERROR | [x] Data types in @param tags need to be fully
    |       |     namespaced
 71 | ERROR | [x] Data types in @param tags need to be fully
    |       |     namespaced
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...r/www/html/drupal-8.4.3/modules/give/src/GiveStripeInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 30 | ERROR | Type hint "array" missing for $plan_data
----------------------------------------------------------------------


FILE: ...r/www/html/drupal-8.4.3/modules/give/src/DonationViewBuilder.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 29 | WARNING | Possible useless method overriding detected
----------------------------------------------------------------------



ioana apetri’s picture

Status: Needs work » Needs review
StatusFileSize
new37.66 KB

Updated the patch, the last php code standards from DonationViewBuilder.php I have no idea how to resolve.
Can you take a look?:) Thanks

nkoporec’s picture

Version: 8.x-1.0-beta4 » 8.x-1.x-dev
Status: Needs review » Needs work

This patch doesn't work on the latest 8.x-1.x branch, although the issue is still active on this branch.Setting issue version to dev. branch

mashir’s picture

StatusFileSize
new83.71 KB

Hi @yo30, the patch (#9) is not be able to applied due to some error. See the attached screenshot. And the naming convention of the patch is also not following the standards. see https://www.drupal.org/node/1054616.

error

mashir’s picture

StatusFileSize
new187.27 KB

++attached screenshot.

sivaprasadc’s picture

Assigned: Unassigned » sivaprasadc
sivaprasadc’s picture

Assigned: sivaprasadc » Unassigned
Status: Needs work » Needs review
StatusFileSize
new49.13 KB

@Mashir

Thanks for reviewing. I have rerolled the patch to resolve the Drupal coding standard suggestions. PFA Patch. Kindly review it.

mashir’s picture

Status: Needs review » Needs work

@Sivaprasad C , patch has been applied but its still showing so many phpcs errors.

--standard=Drupal

FILE: ...tproject/modules/contrib/give/src/Form/Donation/DonationForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 171 | WARNING | Only string literals should be passed to t() where
     |         | possible
----------------------------------------------------------------------

FILE: ...stproject/modules/contrib/give/src/Form/Donation/PaymentForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
  56 | ERROR   | Parameter $problem_log is not described in comment
 286 | WARNING | Only string literals should be passed to t() where
     |         | possible
 348 | WARNING | Only string literals should be passed to t() where
     |         | possible
----------------------------------------------------------------------

FILE: .../d8_testproject/modules/contrib/give/src/DonationViewBuilder.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 16 | WARNING | Possible useless method overriding detected
----------------------------------------------------------------------

--standard=DrupalPractice

FILE: /var/www/html/d8_testproject/modules/contrib/give/give.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
  18 | WARNING | Global constants should not be used, move it to a
     |         | class or interface
  23 | WARNING | Global constants should not be used, move it to a
     |         | class or interface
  28 | WARNING | Global constants should not be used, move it to a
     |         | class or interface
  33 | WARNING | Global constants should not be used, move it to a
     |         | class or interface
  38 | WARNING | Global constants should not be used, move it to a
     |         | class or interface
 236 | WARNING | Variable $this is undefined.
----------------------------------------------------------------------

FILE: ...www/html/d8_testproject/modules/contrib/give/src/MailHandler.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 134 | WARNING | Unused variable $to.
----------------------------------------------------------------------

FILE: ...ject/modules/contrib/give/src/Form/GiveForm/GiveFormEditForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
 206 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 207 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 212 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 213 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 218 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 219 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 272 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 283 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
----------------------------------------------------------------------

FILE: ...tproject/modules/contrib/give/src/Form/GiveForm/GiveSettings.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
 27 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 43 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 47 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 87 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 93 | WARNING | Messages are user facing text and must run through
    |         | t() for translation
----------------------------------------------------------------------

FILE: ...stproject/modules/contrib/give/src/Form/Donation/PaymentForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
  97 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 108 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 123 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 156 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 257 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 268 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 269 | WARNING | t() calls should be avoided in classes, use
     |         | dependency injection and $this->t() instead
 312 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 328 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 332 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 345 | WARNING | Unused variable $plan.
 349 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 375 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 406 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
----------------------------------------------------------------------

FILE: ...stproject/modules/contrib/give/src/Controller/GiveController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 131 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
----------------------------------------------------------------------

FILE: .../www/html/d8_testproject/modules/contrib/give/src/GiveStripe.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
 49 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 57 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 61 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 65 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 67 | WARNING | Variable $plan is undefined.
----------------------------------------------------------------------

FILE: .../www/html/d8_testproject/modules/contrib/give/src/ProblemLog.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 54 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------

FILE: ...html/d8_testproject/modules/contrib/give/src/Entity/Donation.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 506 | WARNING | Unused variable $return.
----------------------------------------------------------------------
jarodriguez’s picture

Assigned: Unassigned » jarodriguez
jarodriguez’s picture

Assigned: jarodriguez » Unassigned
deepanker_bhalla’s picture

Status: Needs work » Needs review
StatusFileSize
new51.84 KB

Fixed the issues.

Status: Needs review » Needs work

The last submitted patch, 18: 2935756-coding-standard-suggestions-18.patch, failed testing. View results

deepanker_bhalla’s picture

Status: Needs work » Needs review

I think its a false alarm.

Sourabhagouda SP’s picture

StatusFileSize
new93.53 KB
volkswagenchick’s picture

Issue tags: +fldc19, +sfdug, +dcnj19

Tagging for upcoming contribution days.

volkswagenchick’s picture

Issue tags: +midcamp2019
mlncn’s picture

I committed what still applied and wouldn't break anything. I think i'll close this issue; if anyone wants to pick up what i didn't commit, here are a few notes on some things i intentionally skipped:

Why would deleting this line in src/DonationViewBuilder.php be safe?

-use Drupal\give\ProblemLog;

Or this one?

- parent::buildComponents($build, $entities, $displays, $view_mode);

Agree that $this->t() must be being misused here (in src/Form/Donation/DonationForm.php line 170) but this change would break things:

-    $elements['submit']['#value'] = $this->t($giveForm->getSubmitText());
+    $elements['submit']['#value'] = $this->$giveForm->getSubmitText();

mlncn’s picture

Status: Needs review » Fixed
gnuget’s picture

It seems that this issue caused a WSOD, I created #3045307 with the fix.

Today I learned that if an interface includes a typehint, it becomes mandatory in the implementation even if the param passed to the function is correct.

This still needs work, this kind of things are just plain wrong and reflect that the person who did this didn't want to help but just wanted to improve his drupal.org profile :-/

 /**
-   * Recurrence is the time between donations made up of the interval count and the interval unit.
+   * Recurrence is the time between donations made up of the interval count and.
+   *
+   * The interval unit.
    */

  • mlncn committed 240f489 on 8.x-1.x
    Issue #2935756 by mlncn, gnuget: Undo phony formatting 'improvement'...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.