Fix the issues reported by phpcs

Created on 11 May 2023, over 1 year ago

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/media_contextual_crop/

FILE: /var/www/html/contribution/web/modules/contrib/media_contextual_crop/src/MediaContextualCropService.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
148 | WARNING | [ ] ImageStyle::load calls should be avoided in classes, use dependency injection instead
175 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/media_contextual_crop/media_contextual_crop.module
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
8 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
14 | ERROR | [x] Expected 1 blank line before function; 2 found
23 | ERROR | [x] Expected 1 space after IF keyword; 0 found
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY

📌 Task
Status

Fixed

Version

1.1

Component

Code

Created by

🇮🇳India himanshu_jhaloya Indore

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024