Coding Standard Issues

Created on 31 January 2025, 2 months ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

FILE: .../web/modules/custom/file_mdm/config/install/file_mdm.settings.yml
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_exif/README.md
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
82 | WARNING | Line exceeds 80 characters; contains 83 characters
88 | WARNING | Line exceeds 80 characters; contains 107 characters
--------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_exif/src/ExifTagMapper.php
-------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Psr\Log\LoggerInterface.
76 | ERROR | [x] Missing function doc comment
110 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_exif/src/Plugin/FileMetadata/Exif.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\DependencyInjection\ContainerInterface.
45 | ERROR | [ ] Missing short description in doc comment
45 | ERROR | [ ] Parameter $container is not described in comment
60 | ERROR | [x] Missing function doc comment
89 | ERROR | [x] Missing function doc comment
179 | ERROR | [x] Missing function doc comment
183 | ERROR | [x] Missing function doc comment
314 | ERROR | [x] Missing function doc comment
334 | ERROR | [x] Missing function doc comment
352 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_exif/tests/src/Kernel/FileMetadataExifTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Tests\file_mdm\Kernel\FileMetadataManagerTestBase.
24 | ERROR | [ ] Missing member variable doc comment
31 | ERROR | [x] Missing function doc comment
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/README.md
------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------
12 | WARNING | Line exceeds 80 characters; contains 93 characters
16 | WARNING | Line exceeds 80 characters; contains 94 characters
68 | WARNING | Line exceeds 80 characters; contains 115 characters
75 | WARNING | Line exceeds 80 characters; contains 93 characters
105 | WARNING | Line exceeds 80 characters; contains 82 characters
------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Form/SettingsForm.php
----------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------
26 | ERROR | [x] Missing function doc comment
38 | ERROR | [x] Missing function doc comment
42 | ERROR | [x] Missing function doc comment
46 | ERROR | [x] Missing function doc comment
96 | ERROR | [x] Missing function doc comment
104 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/FileMetadataManager.php
------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------
62 | ERROR | [x] Missing function doc comment
67 | ERROR | [x] Missing function doc comment
77 | ERROR | [x] Missing function doc comment
87 | ERROR | [x] Missing function doc comment
98 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Element/FileMetadataCaching.php
--------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------
17 | ERROR | [x] Missing function doc comment
26 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/FileMetadata.php
-----------------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 16 LINES
-----------------------------------------------------------------------------------
37 | ERROR | [ ] Missing short description in doc comment
37 | ERROR | [ ] Parameter $pluginManager is not described in comment
37 | ERROR | [ ] Parameter $logger is not described in comment
37 | ERROR | [ ] Parameter $fileSystem is not described in comment
37 | ERROR | [ ] Parameter $configFactory is not described in comment
52 | ERROR | [x] Missing function doc comment
56 | ERROR | [x] Missing function doc comment
60 | ERROR | [x] Missing function doc comment
68 | ERROR | [x] Missing function doc comment
80 | ERROR | [x] Missing function doc comment
87 | ERROR | [x] Missing function doc comment
102 | ERROR | [x] Missing function doc comment
122 | ERROR | [x] Missing function doc comment
152 | ERROR | [x] Missing function doc comment
169 | ERROR | [x] Missing function doc comment
186 | ERROR | [x] Missing function doc comment
191 | ERROR | [x] Missing function doc comment
196 | ERROR | [x] Missing function doc comment
201 | ERROR | [x] Missing function doc comment
206 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Plugin/FileMetadataPluginManager.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
41 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Plugin/FileMetadata/FileMetadataPluginBase.php
-----------------------------------------------------------------------------------------------------------------
FOUND 22 ERRORS AFFECTING 21 LINES
-----------------------------------------------------------------------------------------------------------------
92 | ERROR | [ ] Missing short description in doc comment
92 | ERROR | [ ] Parameter $container is not described in comment
111 | ERROR | [x] Missing function doc comment
139 | ERROR | [x] Missing function doc comment
165 | ERROR | [x] Missing function doc comment
168 | ERROR | [x] Missing function doc comment
181 | ERROR | [x] Missing function doc comment
189 | ERROR | [x] Missing function doc comment
193 | ERROR | [x] Missing function doc comment
198 | ERROR | [x] Missing function doc comment
202 | ERROR | [x] Missing function doc comment
207 | ERROR | [x] Missing function doc comment
211 | ERROR | [x] Missing function doc comment
226 | ERROR | [x] Missing function doc comment
254 | ERROR | [x] Missing function doc comment
309 | ERROR | [x] Missing function doc comment
341 | ERROR | [x] Missing function doc comment
371 | ERROR | [x] Missing function doc comment
399 | ERROR | [x] Missing function doc comment
403 | ERROR | [x] Missing function doc comment
428 | ERROR | [x] Missing function doc comment
456 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Plugin/FileMetadata/GetImageSize.php
-------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------
21 | ERROR | [x] Missing function doc comment
25 | ERROR | [x] Missing function doc comment
50 | ERROR | [x] Missing function doc comment
60 | ERROR | [x] Missing function doc comment
66 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/src/Plugin/Attribute/FileMetadata.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
16 | ERROR | Missing short description in doc comment
----------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/tests/src/Functional/SettingsFormTest.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Tests\BrowserTestBase.
19 | ERROR | [ ] Missing member variable doc comment
27 | ERROR | [ ] Missing member variable doc comment
29 | ERROR | [x] Missing function doc comment
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/tests/src/Kernel/FileMetadataManagerTestBase.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\KernelTests\KernelTestBase.
17 | ERROR | [ ] Missing member variable doc comment
18 | ERROR | [ ] Missing member variable doc comment
20 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/tests/src/Kernel/FileMetadataManagerTest.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
19 | ERROR | Missing member variable doc comment
-----------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_font/README.md
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 91 characters
--------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_font/src/Plugin/FileMetadata/Font.php
-------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------
26 | ERROR | [ ] Missing short description in doc comment
27 | ERROR | [ ] Description for the @return value is missing
33 | ERROR | [x] Missing function doc comment
82 | ERROR | [x] Missing function doc comment
96 | ERROR | [x] Missing function doc comment
100 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/file_mdm/file_mdm_font/tests/src/Kernel/FileMetadataFontTest.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Tests\file_mdm\Kernel\FileMetadataManagerTestBase.
18 | ERROR | [ ] Missing member variable doc comment
26 | ERROR | [x] Missing function doc comment
---------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

3.2

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

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

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Merge request !38Coding standard issues - #3503724 ā†’ (Open) created by alyaj2a
  • Pipeline finished with Success
    about 2 months ago
    Total: 143s
    #418289
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi alyaj2a,

    upon checking the MR !38, I noticed that there are still many PHPCS issues that needs to be settled, please refer to

    āžœ  file_mdm git:(3.2.x) curl https://git.drupalcode.org/project/file_mdm/-/merge_requests/38.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 46377    0 46377    0     0  82486      0 --:--:-- --:--:-- --:--:-- 83411
    patching file 'config/install/file_mdm.settings.yml'
    patching file 'file_mdm_exif/src/ExifTagMapper.php'
    patching file 'file_mdm_exif/src/Plugin/FileMetadata/Exif.php'
    patching file 'file_mdm_exif/tests/src/Kernel/FileMetadataExifTest.php'
    patching file 'file_mdm_font/src/Plugin/FileMetadata/Font.php'
    patching file 'file_mdm_font/tests/src/Kernel/FileMetadataFontTest.php'
    patching file 'src/Element/FileMetadataCaching.php'
    patching file 'src/FileMetadata.php'
    patching file 'src/FileMetadataManager.php'
    patching file 'src/Form/SettingsForm.php'
    patching file 'src/Plugin/Attribute/FileMetadata.php'
    patching file 'src/Plugin/FileMetadata/FileMetadataPluginBase.php'
    patching file 'src/Plugin/FileMetadata/GetImageSize.php'
    patching file 'src/Plugin/FileMetadataPluginManager.php'
    patching file 'tests/src/Functional/SettingsFormTest.php'
    patching file 'tests/src/Kernel/FileMetadataManagerTest.php'
    patching file 'tests/src/Kernel/FileMetadataManagerTestBase.php'
    āžœ  file_mdm git:(3.2.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml file_mdm 
    
    FILE: ...s/contrib/file_mdm/file_mdm_font/tests/src/Kernel/FileMetadataFontTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     8 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\file_mdm\FileMetadataInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...issues/drupal-project/web/modules/contrib/file_mdm/file_mdm_font/README.md
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     15 | WARNING | Line exceeds 80 characters; contains 91 characters
    --------------------------------------------------------------------------------
    
    
    FILE: ...ect/web/modules/contrib/file_mdm/tests/src/Functional/SettingsFormTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     10 | ERROR | [x] Use statements should be sorted alphabetically. The first
        |       |     wrong one is Drupal\file_mdm\FileMetadataManagerInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: .../modules/contrib/file_mdm/tests/src/Kernel/FileMetadataManagerTestBase.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     10 | ERROR | [x] Use statements should be sorted alphabetically. The first
        |       |     wrong one is Drupal\file_mdm\FileMetadataInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...s/contrib/file_mdm/file_mdm_exif/tests/src/Kernel/FileMetadataExifTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\file_mdm\FileMetadataInterface.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...issues/drupal-project/web/modules/contrib/file_mdm/file_mdm_exif/README.md
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     82 | WARNING | Line exceeds 80 characters; contains 83 characters
     88 | WARNING | Line exceeds 80 characters; contains 107 characters
    --------------------------------------------------------------------------------
    
    
    FILE: ...l-project/web/modules/contrib/file_mdm/file_mdm_exif/src/ExifTagMapper.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     13 | ERROR | [x] Use statements should be sorted alphabetically. The first
        |       |     wrong one is lsolesen\pel\PelIfd.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...eb/modules/contrib/file_mdm/file_mdm_exif/src/Plugin/FileMetadata/Exif.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     13 | ERROR | [x] Use statements should be sorted alphabetically. The first
        |       |     wrong one is lsolesen\pel\PelEntry.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...ojects/drupal-issues/drupal-project/web/modules/contrib/file_mdm/README.md
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------------
      12 | WARNING | Line exceeds 80 characters; contains 93 characters
      16 | WARNING | Line exceeds 80 characters; contains 94 characters
      68 | WARNING | Line exceeds 80 characters; contains 115 characters
      75 | WARNING | Line exceeds 80 characters; contains 93 characters
     105 | WARNING | Line exceeds 80 characters; contains 82 characters
    --------------------------------------------------------------------------------
    
    Time: 912ms; Memory: 14MB
    
    āžœ  contrib git:(main) āœ— 
    
Production build 0.71.5 2024