A scan of the current dev branch turns up the following Drupal coding standards issues:

FILE: /app/smart_date.module
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
 113 | ERROR | [x] Expected one space after the comma, 0 found
 129 | ERROR | [x] Case breaking statements must be followed by a
     |       |     single blank line
 133 | ERROR | [x] Case breaking statements must be followed by a
     |       |     single blank line
 137 | ERROR | [x] Case breaking statements must be followed by a
     |       |     single blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/smart_date.views.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
 43 | WARNING | [x] A comma should follow the last multiline array
    |         |     item. Found: 'The recurrence rule for the
    |         |     specified date/time range.'
 66 | WARNING | [ ] Only string literals should be passed to t()
    |         |     where possible
 68 | WARNING | [ ] Only string literals should be passed to t()
    |         |     where possible
 76 | ERROR   | [x] Short array syntax must be used to define arrays
 85 | ERROR   | [x] Expected 1 space after "=>"; 2 found
 85 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/smart_date.install
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 48 | WARNING | [x] A comma should follow the last multiline array
    |         |     item. Found: ]
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/modules/smart_date_recur/smart_date_recur.views.inc
----------------------------------------------------------------------
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: /app/modules/smart_date_recur/smart_date_recur.module
----------------------------------------------------------------------
FOUND 17 ERRORS AND 2 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------
 264 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: ]
 277 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: ]
 309 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 318 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 319 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 322 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 323 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 4
 512 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 522 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
 654 | ERROR   | [x] A unary operator statement must not be followed
     |         |     by a space
 655 | ERROR   | [x] Missing function doc comment
 655 | ERROR   | [x] Expected 1 blank line before function; 0 found
 656 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 6
 657 | ERROR   | [x] Line indented incorrectly; expected 6 spaces,
     |         |     found 10
 658 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 6
 660 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 6
 660 | ERROR   | [x] Expected 1 space before "-"; 0 found
 660 | ERROR   | [x] Expected 1 space after "-"; 0 found
 661 | ERROR   | [x] Expected 1 blank line after function; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...odules/smart_date_recur/src/Form/SmartDateRemoveInstanceForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 151 | WARNING | Line exceeds 80 characters; contains 88 characters
----------------------------------------------------------------------


FILE: /app/modules/smart_date_recur/src/Entity/SmartDateRule.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------
 413 | ERROR   | [x] Expected 1 space after SWITCH keyword; 0 found
 424 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 434 | ERROR   | [x] Line indented incorrectly; expected 8 spaces,
     |         |     found 10
 434 | ERROR   | [x] Closing brace indented incorrectly; expected 8
     |         |     spaces, found 10
 465 | ERROR   | [x] Expected newline after closing brace
 599 | WARNING | [ ] Possible useless method overriding detected
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...p/modules/smart_date_recur/src/Plugin/views/filter/Frequency.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 30 | ERROR | Doc comment short description must be on a single line,
    |       | further text should be a separate paragraph
 40 | ERROR | Doc comment short description must be on a single line,
    |       | further text should be a separate paragraph
----------------------------------------------------------------------


FILE: /app/modules/smart_date_recur/src/Controller/Instances.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 9 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Plugin/Field/FieldWidget/SmartDateTimezoneWidget.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 122 | WARNING | [ ] Line exceeds 80 characters; contains 82
     |         |     characters
 122 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 149 | WARNING | [ ] Translatable strings must not begin or end with
     |         |     white spaces, use placeholders with t() for
     |         |     variables
 174 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 252 | WARNING | [x] There must be no blank line following an inline
     |         |     comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Plugin/Field/FieldType/SmartDateFieldItemList.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 67 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     0
 67 | ERROR | [x] Closing brace indented incorrectly; expected 2
    |       |     spaces, found 0
 67 | ERROR | [x] Expected 1 blank line after function; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


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


FILE: /app/src/Plugin/FullcalendarViewProcessor/SmartDateProcessor.php
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
  21 | ERROR | [ ] Missing short description in doc comment
  39 | ERROR | [x] Expected 1 space after "="; 2 found
  89 | ERROR | [x] Separate the @param and @return sections by a
     |       |     blank line.
  89 | ERROR | [x] Return type must not contain variable name "$ids"
 136 | ERROR | [x] Use "elseif" in place of "else if"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Controller/FullCalendarController.php
----------------------------------------------------------------------
FOUND 18 ERRORS AND 1 WARNING AFFECTING 10 LINES
----------------------------------------------------------------------
  22 | ERROR   | [x] You must use "/**" style comments for a member
     |         |     variable comment
  22 | ERROR   | [x] Expected 1 space before "*"; 0 found
  22 | ERROR   | [x] Expected 1 space after "*"; 0 found
  24 | ERROR   | [x] Missing function doc comment
  93 | ERROR   | [x] Inline comments must start with a capital letter
  93 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
  94 | ERROR   | [x] Expected 1 space before "*"; 0 found
  94 | ERROR   | [x] Expected 1 space after "*"; 0 found
  98 | ERROR   | [x] Expected 1 space before "*"; 0 found
  98 | ERROR   | [x] Expected 1 space after "*"; 0 found
 103 | ERROR   | [x] Inline comments must start with a capital letter
 103 | ERROR   | [x] Inline comments must end in full-stops,
     |         |     exclamation marks, colons, question marks, or
     |         |     closing parentheses
 105 | ERROR   | [x] Expected 1 space before "/"; 0 found
 105 | ERROR   | [x] Expected 1 space after "/"; 0 found
 158 | ERROR   | [ ] Type hint "timestamp" missing for $endDate
 158 | ERROR   | [ ] Type hint "timestamp" missing for $startDate
 163 | ERROR   | [x] Expected 1 space before "/"; 0 found
 163 | ERROR   | [x] Expected 1 space after "/"; 0 found
 172 | WARNING | [ ] Line exceeds 80 characters; contains 106
     |         |     characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Feeds/Target/SmartDate.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 36 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found
    |       |     10
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/SmartDateTrait.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 458 | ERROR | [x] Expected "bool" but found "boolean" for function
     |       |     return type
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/src/Routing/RouteSubscriber.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | [x] Missing class doc comment
 10 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Comments

mandclu created an issue. See original summary.

sahana _n’s picture

Status: Active » Needs review
StatusFileSize
new12.2 KB

Please review the patch.

suresh prabhu parkala’s picture

StatusFileSize
new24.29 KB

updated patch please review.

  • mandclu committed 39ab2e9 on 3.0.x
    Issue #3169691 by mandclu: Coding Standards
    
mandclu’s picture

Status: Needs review » Fixed

LOL should have assigned it to myself to make it clear I was already working on it. I appreciate the swift effort though!

Status: Fixed » Closed (fixed)

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