Resolve Gitlab CI pipeline flagged issues

Created on 5 June 2024, 23 days ago
Updated 22 June 2024, 7 days ago

cspell - https://git.drupalcode.org/project/maintenance_mode_redirect/-/jobs/1777857

./src/EventSubscriber/MaintenanceModeRedirectSubscriber.php:21:53     
- Unknown word (Subcriber)  -- core MaintenanceModeSubcriber events.
	 Suggestions: [Subscriber, Subtribe, Subscribe, Subscribed, Subscribes]

phpcs - https://git.drupalcode.org/project/maintenance_mode_redirect/-/jobs/1777854

FILE: ...ce_mode_redirect/src/EventSubscriber/MaintenanceModeRedirectSubscriber.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
  7 | WARNING | [x] Unused use statement
    |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
 14 | WARNING | [ ] The class short comment should describe what the class does
    |         |     and not simply repeat the class name
    |         |     (Drupal.Commenting.ClassComment.Short)
 22 | ERROR   | [x] Short array syntax must be used to define arrays
    |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 33 | ERROR   | [x] Short array syntax must be used to define arrays
    |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 125ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...t/src/EventSubscriber/MaintenanceModeRedirectSubscriber.php  2       2
--------------------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 2 WARNINGS WERE FOUND IN 2 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 3 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[x] Drupal.Arrays.DisallowLongArraySyntax.Found                  2
[x] Drupal.Classes.UnusedUseStatement.UnusedUse                  1
[ ] Drupal.Commenting.ClassComment.Short                         1


----------------------------------------------------------------------

phpstan - https://git.drupalcode.org/project/maintenance_mode_redirect/-/jobs/1777855

  Line   maintenance_mode_redirect.module                                     
 ------ --------------------------------------------------------------------- 
  17     Call to static method fromRoute() on an unknown class Url.           
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------------------------------------- 
  Line   src/EventSubscriber/MaintenanceModeRedirectSubscriber.php                                                  
 ------ ----------------------------------------------------------------------------------------------------------- 
  32     Parameter $event of method                                                                                 
         Drupal\maintenance_mode_redirect\EventSubscriber\MaintenanceModeRedirectSubscriber::checkForRedirection()  
         has invalid type                                                                                           
         Drupal\maintenance_mode_redirect\EventSubscriber\GetResponseEvent.                                         
  38     \Drupal calls should be avoided in classes, use dependency injection                                       
         instead                                                                                                    
  40     \Drupal calls should be avoided in classes, use dependency injection                                       
         instead                                                                                                    
  43     \Drupal calls should be avoided in classes, use dependency injection                                       
         instead                                                                                                    
  50     \Drupal calls should be avoided in classes, use dependency injection                                       
         instead                                                                   
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom aaron.ferris

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024