Coding standards and other fixes for the D10 release.

Created on 24 October 2023, 11 months ago

Problem/Motivation

We are going to release D10 module release, so we should to fix all coding standards and other minor moments.

Proposed resolution

Check phpcs notes:

FILE: /var/www/html/web/modules/contrib/views_extras/views_extras.views.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/views_extras/src/Plugin/views/argument_default/Session.php
--------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------
 30 | ERROR | Class property $current_user should use lowerCamel naming without underscores
 46 | ERROR | Parameter $token is not described in comment
 59 | ERROR | Missing parameter name
--------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/views_extras/src/Plugin/views/argument_default/Cookie.php
-------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------
 31 | ERROR | Class property $current_user should use lowerCamel naming without underscores
 47 | ERROR | Parameter $token is not described in comment
 60 | ERROR | Missing parameter name
-------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/views_extras/src/Plugin/views/argument_default/TempStore.php
--------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
 54 | ERROR | Parameter $currentUser is not described in comment
 63 | ERROR | Doc comment for parameter $current_user does not match actual variable name $temp_store_factory
--------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/views_extras/src/Plugin/views/area/ExtraResult.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  66 | ERROR   | [x] Expected 1 space after closing parenthesis; found 2
  84 | WARNING | [x] '@TODO: Maybe use a possible is views empty functionality.' should match the format '@todo Fix problem X here.'
  86 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 117 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 118 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 118 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 119 | ERROR   | [x] No space found before comment text; expected "// condition to hide more count when its 0." but found "//condition to hide more count when its 0."
 119 | ERROR   | [x] Inline comments must start with a capital letter
 120 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 120 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 124 | ERROR   | [x] Expected 1 space after ELSE keyword; 0 found
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 343ms; Memory: 10MB

Remaining tasks

- Fix coding standards;
- Move code from the views_extras.views.inc to the views_extras.module file;

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

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

Comments & Activities

Production build 0.71.5 2024