phpcs Drupal coding standards

Created on 29 July 2020, about 4 years ago
Updated 1 August 2024, about 1 month ago

Problem/Motivation

FILE: /svg_sanitizer/tests/src/Kernel/SvgSanitizerFormatterTest.php
-------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
 14 | WARNING | [x] Unused use statement
 15 | WARNING | [x] Unused use statement
 82 | ERROR   | [ ] Parameter $filepath is not described in comment
 85 | ERROR   | [ ] Doc comment for parameter $url does not match actual variable name $settings
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------


FILE: /svg_sanitizer/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 3 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------


FILE: /svg_sanitizer/src/SvgSanitizerTags.php
-------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------
  3 | ERROR | [x] There must be one blank line after the namespace declaration
  9 | ERROR | [x] Missing class doc comment
 18 | ERROR | [x] Doc comment short description must end with a full stop
 20 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------


FILE: /svg_sanitizer/src/Plugin/Field/FieldFormatter/SvgSanitizer.php
--------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------
  25 | ERROR | [x] There must be exactly one newline after the class comment
  47 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
     |       |     parentheses
 120 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
     |       |     parentheses
 123 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
     |       |     parentheses
 128 | ERROR | [x] Inline comments must start with a capital letter
 128 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
     |       |     parentheses
 133 | ERROR | [x] Inline comments must start with a capital letter
 133 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
     |       |     parentheses
 137 | ERROR | [x] Expected 1 blank line after function; 2 found
 140 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: /svg_sanitizer/src/SvgSanitizerAttributes.php
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
 9 | ERROR | [x] Doc comment short description must end with a full stop
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India harishh

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

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.

Production build 0.71.5 2024