Fix the issues reported by phpcs

Created on 15 February 2023, almost 2 years ago
Updated 28 May 2023, over 1 year ago

Problem/Motivation

FILE: ...Documents/MySites/10.1.x/drupal/modules/contrib/single_image_formatter/single_image_formatter_responsive/single_image_formatter_responsive.info.yml
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: .../drupal/modules/contrib/single_image_formatter/single_image_formatter_responsive/src/Plugin/Field/FieldFormatter/SingleResponsiveImageFormatter.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
 28 | ERROR | [x] Expected 1 blank line after function; 0 found
 29 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: .../MySites/10.1.x/drupal/modules/contrib/single_image_formatter/single_image_formatter_media/src/Plugin/Field/FieldFormatter/SingleMediaFormatter.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
 28 | ERROR | [x] Expected 1 blank line after function; 0 found
 29 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 71ms; 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 /drupal/modules/contrib/single_image_formatter

Proposed resolution

Fix all the errors/warnings shown

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sahil.goyal

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