Fix the issues reported by phpcs

Created on 16 February 2023, over 1 year ago
Updated 5 September 2023, 10 months ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/tests/src/Functional/EntityOperationsTest.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------------------------------
 65 | ERROR   | [ ] Parameter tags must be defined first in a doc comment
 65 | ERROR   | [ ] Missing parameter type
 67 | ERROR   | [ ] Missing parameter type
 78 | ERROR   | [ ] Type hint "array" missing for $permissions
 78 | ERROR   | [ ] Type hint "array" missing for $modules
 86 | ERROR   | [x] There should be no white space after an opening "("
 94 | WARNING | [ ] Unused variable $group.
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/tests/src/Kernel/GroupMediaConfigTest.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
 27 | WARNING | [x] A comma should follow the last multiline array item. Found: 'views'
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/groupmedia.module
-----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------
  14 | WARNING | [x] Unused use statement
 107 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/modules/groupmedia_paragraphs/groupmedia_paragraphs.module
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 37 | WARNING | [x] '@TODO: Fix when the parent paragraph was not yet saved.' should match the format '@todo Fix problem X here.'
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/modules/groupmedia_vbo/src/Plugin/Action/RemoveMediaFromGroup.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
 77 | ERROR | [x] Expected 1 blank line after function; 0 found
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Form/GroupMediaSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/Group/Relation/GroupMediaDeriver.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
 14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/Group/RelationHandler/GroupMediaOperationProvider.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------
 42 | WARNING | [ ] MediaType::load calls should be avoided in classes, use dependency injection instead
 49 | WARNING | [x] A comma should follow the last multiline array item. Found: pluginId
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/MediaFinder/TextFieldEmbedBase.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------
 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
 83 | WARNING | Line exceeds 80 characters; contains 81 characters
---------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/MediaFinder/MediaReference.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
 29 | WARNING | Line exceeds 80 characters; contains 81 characters
-----------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/MediaFinder/MediaFinderBase.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/Plugin/Action/RemoveMediaFromGroup.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 76 | ERROR | [x] Expected 1 blank line after function; 0 found
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/AttachMediaToGroup.php
----------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
  21 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 124 | ERROR   | [x] Expected 1 spaces after parameter type; 9 found
 126 | ERROR   | [x] Expected 1 spaces after parameter type; 2 found
 128 | ERROR   | [x] Expected 1 spaces after parameter type; 35 found
 193 | ERROR   | [x] Expected newline after closing brace
 196 | ERROR   | [x] Expected newline after closing brace
 247 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/groupmedia/src/MediaFinderInterface.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

Time: 291ms; Memory: 10MB

Steps to reproduce

Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /10.1.x/drupal/modules/contrib/groupmedia

Proposed resolution

Fix all the PHP Coding standard Issues.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇮🇳India sahil.goyal

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

Comments & Activities

Production build 0.69.0 2024