Fix the issues reported by phpcs

Created on 22 March 2018, over 6 years ago
Updated 25 June 2024, 3 days ago

Problem/Motivation

FILE: /modules/contrib/simple_zoom/src/Plugin/Field/FieldFormatter/ZoomImageFormatter.php
-----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
30 | ERROR | [x] Short array syntax must be used to define arrays
106 | ERROR | [x] Short array syntax must be used to define arrays
106 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/simple_zoom.info.yml
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
-----------------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/zoom_inline/src/Plugin/CKEditorPlugin/DrupalInlineImageZoom.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
47 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/zoom_inline/zoom_inline.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/simple_zoom.module
-----------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------
35 | ERROR | [x] Short array syntax must be used to define arrays
36 | ERROR | [x] Short array syntax must be used to define arrays
44 | ERROR | [x] Expected 1 blank line after function; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/css/zoom.css
----------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------
11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 7
12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
30 | ERROR | [x] Expected 1 space after colon in style definition; 6 found
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 7
31 | ERROR | [x] Expected 1 space after colon in style definition; 6 found
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
32 | ERROR | [x] Expected 1 space after colon in style definition; 6 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: modules/contrib/simple_zoom/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
46 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------

Time: 195ms; Memory: 10MB

Steps to reproduce

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

Proposed resolution

Resolve the PHPCS issues.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia neeraprajapati Bangalore

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Merge request !2Issue #2955180: Fix PHPCS error โ†’ (Open) created by urvashi_vora
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

    Created an MR

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Indra patil Bangalore
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Indra patil Bangalore
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rajneeshb New Delhi

    Reviewed MR !2, attaching screenshots for reference, Looks good to me

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Fixed the mentioned errors.

    FILE: /home/addweb/patches/simple_zoom-2955180/src/Plugin/Field/FieldFormatter/ZoomImageFormatter.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/patches/simple_zoom-2955180/simple_zoom.module
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Unicode.
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/patches/simple_zoom-2955180/zoom_inline/src/Plugin/CKEditorPlugin/DrupalInlineImageZoom.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\ckeditor\CKEditorPluginInterface.
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/patches/simple_zoom-2955180/zoom_inline/zoom_inline.module
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------
    
Production build 0.69.0 2024