Fix PHPCS errors and warnings

Created on 4 January 2023, over 1 year ago
Updated 10 February 2024, 4 months ago

PHPCS reported the following Errors and warnings:

FILE: /revision_graph/js/revision_graph.js
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 17 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: /revision_graph/src/Controller/RevisionGraphNodeController.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------
  95 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 124 | WARNING | [ ] Unused variable $langcode.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: /revision_graph/src/RevisionGraphStorage.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
  9 | ERROR   | [x] Missing class doc comment
 40 | ERROR   | [x] Missing function doc comment
 50 | ERROR   | [x] Missing function doc comment
 51 | WARNING | [x] '@TODO hunt actual parent version id.' should match the format '@todo Fix problem X here.'
 57 | WARNING | [x] '@TODO Check if this is a bug in core due to some optimisation.' should match the format '@todo Fix problem X here.'
 81 | ERROR   | [x] Missing function doc comment
 86 | ERROR   | [x] Missing function doc comment
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /revision_graph/src/RevisionGraphProcess.php
------------------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AND 3 WARNINGS AFFECTING 32 LINES
------------------------------------------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
  6 | WARNING | [x] Unused use statement
 14 | ERROR   | [x] Opening brace should be on the same line as the declaration
 15 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 16 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 17 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 19 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 22 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 23 | ERROR   | [x] Opening brace should be on the same line as the declaration
 24 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 25 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 8
 26 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 27 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
 27 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 28 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 29 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 31 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 32 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 33 | ERROR   | [x] Object operator not indented correctly; expected 14 spaces but found 16
 34 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 35 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 37 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 40 | ERROR   | [x] Expected "int|null" but found "integer|null" for function return type
 43 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 44 | ERROR   | [x] Opening brace should be on the same line as the declaration
 45 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 45 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
 46 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 47 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 8
 48 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 50 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 12
 51 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 52 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 53 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 33 MARKED SNIFF VIOLATIONS AUTOMATICALLY
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany SolimanHarkas

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.

Production build 0.69.0 2024