Fix code standard

Created on 29 March 2018, about 7 years ago
Updated 28 November 2024, 4 months ago

Below, some examples:

FILE: ...s/DCO/core/D8/modules/contrib/smart_ip/src/DatabaseFileEvent.php
----------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 16 LINES
----------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should
    |       |     not begin with a file doc comment
 27 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 34 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 40 | ERROR | [ ] Missing short description in doc comment
 41 | ERROR | [ ] Description for the @return value is missing
 47 | ERROR | [ ] Missing short description in doc comment
 48 | ERROR | [ ] Missing parameter comment
 54 | ERROR | [ ] Missing short description in doc comment
 55 | ERROR | [ ] Description for the @return value is missing
 61 | ERROR | [ ] Missing short description in doc comment
 62 | ERROR | [ ] Missing parameter comment
 68 | ERROR | [ ] Missing short description in doc comment
 69 | ERROR | [ ] Description for the @return value is missing
 75 | ERROR | [ ] Missing short description in doc comment
 76 | ERROR | [ ] Missing parameter comment
 81 | ERROR | [x] Expected 1 newline at end of file; 0 found
 81 | ERROR | [x] The closing brace for the class must have an empty
    |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...O/core/D8/modules/contrib/smart_ip/src/WebServiceUtilityBase.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should
    |       |     not begin with a file doc comment
 19 | ERROR | [x] Expected 1 blank line before function; 0 found
 37 | ERROR | [x] Expected 1 newline at end of file; 0 found
 37 | ERROR | [x] The closing brace for the class must have an empty
    |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...contrib/smart_ip/src/EventSubscriber/GeolocateUserSubscriber.php
----------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should
    |         |     not begin with a file doc comment
 25 | ERROR   | [ ] Missing parameter comment
 27 | ERROR   | [ ] Public method name
    |         |     "GeolocateUserSubscriber::GeolocateUser" is not
    |         |     in lowerCamel format
 27 | ERROR   | [x] Expected 1 blank line before function; 0 found
 28 | ERROR   | [x] Inline comments must end in full-stops,
    |         |     exclamation marks, colons, question marks, or
    |         |     closing parentheses
 30 | ERROR   | [x] Inline comments must end in full-stops,
    |         |     exclamation marks, colons, question marks, or
    |         |     closing parentheses
 34 | WARNING | [ ] \Drupal calls should be avoided in classes, use
    |         |     dependency injection instead
 38 | WARNING | [ ] \Drupal calls should be avoided in classes, use
    |         |     dependency injection instead
 48 | ERROR   | [x] Visibility must be declared on method
    |         |     "getSubscribedEvents"
 48 | ERROR   | [x] Expected 1 space before opening brace; found 0
 52 | ERROR   | [x] Expected 1 newline at end of file; 0 found
 52 | ERROR   | [x] The closing brace for the class must have an
    |         |     empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../DCO/core/D8/modules/contrib/smart_ip/src/AdminSettingsEvent.php
----------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 16 LINES
----------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should
    |       |     not begin with a file doc comment
 27 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 34 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 40 | ERROR | [ ] Missing short description in doc comment
 41 | ERROR | [ ] Description for the @return value is missing
 47 | ERROR | [ ] Missing short description in doc comment
 48 | ERROR | [ ] Missing parameter comment
 54 | ERROR | [ ] Missing short description in doc comment
 55 | ERROR | [ ] Description for the @return value is missing
 61 | ERROR | [ ] Missing short description in doc comment
 62 | ERROR | [ ] Missing parameter comment
 68 | ERROR | [ ] Missing short description in doc comment
 69 | ERROR | [ ] Description for the @return value is missing
 75 | ERROR | [ ] Missing short description in doc comment
 76 | ERROR | [ ] Missing parameter comment
 81 | ERROR | [x] Expected 1 newline at end of file; 0 found
 81 | ERROR | [x] The closing brace for the class must have an empty
    |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
📌 Task
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇧🇷Brazil emartoni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • heddn Nicaragua

    Drupal 8 & 9 are no longer supported. This version of the module this was opened against only supports these earlier versions of Drupal. If this is still something you want addressed in the current 5.x version of the module, please re-open and provide some next steps.

Production build 0.71.5 2024