FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/templates/lightgallery_views.theme.inc
---------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 16 | ERROR | [ ] Type hint "array" missing for $variables
 22 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 44 | ERROR | [x] Short array syntax must be used to define arrays
 87 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
  1 | WARNING | Line exceeds 80 characters; contains 92 characters
  2 | WARNING | Line exceeds 80 characters; contains 87 characters
 29 | WARNING | Line exceeds 80 characters; contains 87 characters
 43 | WARNING | Line exceeds 80 characters; contains 89 characters
----------------------------------------------------------------------


FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/lightgallery.module
----------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------
 29 | ERROR | [x] Short array syntax must be used to define arrays
 30 | ERROR | [x] Short array syntax must be used to define arrays
 31 | ERROR | [x] Short array syntax must be used to define arrays
 31 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/lightgallery.install
-----------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------
 12 | ERROR | [x] Short array syntax must be used to define arrays
 26 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/src/Group/GroupLightgalleryCore.php
--------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------
  5 | ERROR | [x] Missing class doc comment
  7 | ERROR | [ ] Missing short description in doc comment
 11 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
 14 | ERROR | [ ] Missing short description in doc comment
 18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
 21 | ERROR | [ ] Missing short description in doc comment
 28 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/src/Group/GroupBase.php
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------
  3 | ERROR | [x] There must be one blank line after the namespace declaration
  6 | ERROR | [x] Missing class doc comment
  6 | ERROR | [x] Expected 1 space before opening brace; found 0
  8 | ERROR | [ ] Missing short description in doc comment
 12 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
 15 | ERROR | [ ] Missing short description in doc comment
 19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
 22 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/Old/lightgallery/src/Group/GroupLightgalleryThumbs.php
----------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
----------------------------------------------------------------------------------------------
  3 | ERROR   | [x] There must be one blank line after the namespace declaration
  6 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] Missing class doc comment
 11 | ERROR   | [ ] Missing short description in doc comment
 15 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
 18 | ERROR   | [ ] Missing short description in doc comment
 22 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
 25 | ERROR   | [ ] Missing short description in doc comment
 29 | ERROR   | [x] Data types in @var tags need to be fully namespaced
 34 | ERROR   | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------

and more...............

Comments

deepanker_bhalla created an issue. See original summary.

deepanker_bhalla’s picture

Status: Active » Needs work
StatusFileSize
new87.63 KB

Fixed the reported issues except some of them as mentioned below:

FILE: /var/www/html/tolearn/modules/git/lightgallery/src/Plugin/views/style/LightGallery.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------
 132 | WARNING | Only string literals should be passed to t() where possible
 134 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/lightgallery/src/Plugin/Field/FieldFormatter/LightgalleryFormatter.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
 68 | WARNING | Only string literals should be passed to t() where possible
 70 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------------------------
yoftahe.addweb’s picture

Status: Needs work » Needs review
StatusFileSize
new87.83 KB

@deepanker_bhalla, Please find the patch that resolves the remaining coding standards mentioned in #2.

deepanker_bhalla’s picture

Status: Needs review » Needs work

@nilesh.addweb: I can confirm the patch #3 is applying cleanly. Here is the output:

❯ lightgallery/ 8.x-1.x* git apply -v lightgallery-3017149-3.patch
Checking patch README.md...
Checking patch lightgallery.install...
Checking patch lightgallery.module...
Checking patch src/Field/FieldAnimateThumb.php...
Checking patch src/Field/FieldAutoplay.php...
...and more....
Applied patch README.md cleanly.
Applied patch lightgallery.install cleanly.
Applied patch lightgallery.module cleanly.
Applied patch src/Field/FieldAnimateThumb.php cleanly.
..and more...
_________________________________________________________________________________________________________

But after checking with phpcs --standard=Drupal lightgallery/.......

I am getting the same issue as not solved. i.e.

FILE: /var/www/html/tolearn/modules/git/lightgallery/src/Plugin/views/style/LightGallery.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------
 132 | WARNING | Only string literals should be passed to t() where possible
 134 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------


FILE: /var/www/html/tolearn/modules/git/lightgallery/src/Plugin/Field/FieldFormatter/LightgalleryFormatter.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
 68 | WARNING | Only string literals should be passed to t() where possible
 70 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------------------------
patelmayank7552’s picture

Status: Needs work » Needs review
StatusFileSize
new88.77 KB

Hi @nilesh.addweb,

I have applied your patch but the errors mentioned in comment #2 has not been fixed.

So I have fixed those errors and now uploading the patch.

deepanker_bhalla’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm the patch #5 applied successfully and to which no more issues were found.

phjou’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.