Fix the issues reported by phpcs

Created on 25 May 2022, over 2 years ago
Updated 16 February 2024, 9 months ago

Running returns the following warnings/errors, which should be fixed.

FILE: ./css/share_everywhere.css
------------------------------------------------------------
FOUND 30 ERRORS AFFECTING 30 LINES
------------------------------------------------------------
 308 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 309 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 321 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 322 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 323 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 325 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 326 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 327 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 329 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 330 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 331 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 333 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 334 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 335 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 337 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 338 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 339 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 351 | ERROR | [x] Multiple selectors should each be on a single line
 389 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 390 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 391 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 396 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 397 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 398 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 429 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 430 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 431 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
 436 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 5
 437 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 7
 438 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
     |       |     found 10
------------------------------------------------------------
PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------


FILE: ./share_everywhere.module
------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Entity\Display\EntityViewDisplayInterface.
------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------


FILE: ./src/Form/ShareEverywhereConfigForm.php
------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------
   7 | ERROR | [x] Use statements should be sorted alphabetically.
     |       |     The first wrong one is
     |       |     Drupal\Core\Form\ConfigFormBase.
 234 | ERROR | [ ] The array declaration extends to column 83 (the
     |       |     limit is 80). The array content should be split up
     |       |     over multiple lines
 385 | ERROR | [ ] The array declaration extends to column 118 (the
     |       |     limit is 80). The array content should be split up
     |       |     over multiple lines
------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------


FILE: ./src/Plugin/Block/ShareEverywhereBlock.php
------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\share_everywhere\ShareEverywhereServiceInterface.
------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------


FILE: ...share_everywhere/src/Plugin/views/field/ShareEverywhereField.php
------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\views\Plugin\views\field\FieldPluginBase.
------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------


FILE: ./src/ShareEverywhereService.php
------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------
  91 | WARNING | Only string literals should be passed to t() where
     |         | possible
  92 | WARNING | Only string literals should be passed to t() where
     |         | possible
  97 | WARNING | Only string literals should be passed to t() where
     |         | possible
 105 | WARNING | Only string literals should be passed to t() where
     |         | possible
 111 | WARNING | Only string literals should be passed to t() where
     |         | possible
------------------------------------------------------------

Time: 363ms; Memory: 14MB
๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia vshlbndr

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

Merge Requests

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