PHPCS Coding standard suggestions

Created on 9 April 2018, over 6 years ago
Updated 4 July 2023, over 1 year ago

Some coding standards messages reported on phpcs:

FILE: /var/www/html/Contribution/views_blogspot_archive/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 3 | WARNING | Line exceeds 80 characters; contains 88 characters
----------------------------------------------------------------------


FILE: ...iews_blogspot_archive/templates/views_blogspot_archive.theme.inc
----------------------------------------------------------------------
FOUND 12 ERRORS AND 4 WARNINGS AFFECTING 13 LINES
----------------------------------------------------------------------
  29 | ERROR   | [x] Short array syntax must be used to define arrays
  50 | WARNING | [ ] Line exceeds 80 characters; contains 81
     |         |     characters
 145 | ERROR   | [x] Short array syntax must be used to define arrays
 154 | ERROR   | [x] Short array syntax must be used to define arrays
 159 | WARNING | [ ] Line exceeds 80 characters; contains 107
     |         |     characters
 165 | ERROR   | [x] Short array syntax must be used to define arrays
 172 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
 179 | ERROR   | [x] Short array syntax must be used to define arrays
 180 | ERROR   | [x] Short array syntax must be used to define arrays
 182 | ERROR   | [x] Short array syntax must be used to define arrays
 189 | ERROR   | [x] Short array syntax must be used to define arrays
 195 | WARNING | [ ] Only string literals should be passed to t()
     |         |     where possible
 195 | ERROR   | [x] Short array syntax must be used to define arrays
 195 | ERROR   | [x] Short array syntax must be used to define arrays
 195 | ERROR   | [x] Short array syntax must be used to define arrays
 197 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...blogspot_archive/src/Plugin/views/style/ViewsBlogspotArchive.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
 57 | ERROR | [x] Short array syntax must be used to define arrays
 58 | ERROR | [x] Short array syntax must be used to define arrays
 59 | ERROR | [x] Short array syntax must be used to define arrays
 70 | ERROR | [x] Short array syntax must be used to define arrays
 74 | ERROR | [x] Short array syntax must be used to define arrays
 84 | ERROR | [x] Short array syntax must be used to define arrays
 97 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...ontribution/views_blogspot_archive/views_blogspot_archive.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one
   |       |     blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...tribution/views_blogspot_archive/views_blogspot_archive.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | WARNING | All dependencies must be prefixed with the project
   |         | name, for example "drupal:"
----------------------------------------------------------------------

Time: 112ms; Memory: 8Mb
📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India sivaprasadc

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