Following coding standards are thrown:

❯ phpcs --standard=Drupal,DrupalPractice .

FILE: /Users/jaykandari/work/drupal9/modules/contrib/image_popup/js/plugins/imagepopup/plugin.js
------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------
 19 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 29 | ERROR | [x] There should be no white space after an opening "("
 58 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------


FILE: /Users/jaykandari/work/drupal9/modules/contrib/image_popup/src/Form/EditorImagePopupDialog.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 41 ERRORS AND 11 WARNINGS AFFECTING 42 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  56 | ERROR   | [ ] Parameter $form is not described in comment
  56 | ERROR   | [ ] Parameter $form_state is not described in comment
  98 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 101 | ERROR   | [x] Short array syntax must be used to define arrays
 105 | ERROR   | [x] Short array syntax must be used to define arrays
 106 | ERROR   | [x] Short array syntax must be used to define arrays
 107 | ERROR   | [x] Short array syntax must be used to define arrays
 108 | ERROR   | [x] Short array syntax must be used to define arrays
 109 | ERROR   | [x] Short array syntax must be used to define arrays
 114 | ERROR   | [x] Short array syntax must be used to define arrays
 144 | ERROR   | [x] Short array syntax must be used to define arrays
 156 | ERROR   | [x] No space found before comment text; expected "// if (isset($image_element['data-align'])) {" but found "//if (isset($image_element['data-align'])) {"
 158 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
 163 | WARNING | [x] There must be no blank line following an inline comment
 163 | WARNING | [ ] There must be no blank line following an inline comment
 163 | ERROR   | [x] No space found before comment text; expected "// }" but found "//}"
 163 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 165 | ERROR   | [x] Short array syntax must be used to define arrays
 168 | ERROR   | [x] Short array syntax must be used to define arrays
 175 | ERROR   | [x] Short array syntax must be used to define arrays
 175 | ERROR   | [x] Short array syntax must be used to define arrays
 181 | ERROR   | [x] Short array syntax must be used to define arrays
 185 | ERROR   | [x] Short array syntax must be used to define arrays
 189 | ERROR   | [x] Short array syntax must be used to define arrays
 192 | ERROR   | [x] Short array syntax must be used to define arrays
 193 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 195 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 199 | ERROR   | [x] Short array syntax must be used to define arrays
 200 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 202 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 207 | ERROR   | [x] Short array syntax must be used to define arrays
 211 | ERROR   | [x] Short array syntax must be used to define arrays
 212 | ERROR   | [x] Short array syntax must be used to define arrays
 229 | ERROR   | [x] Short array syntax must be used to define arrays
 236 | ERROR   | [x] Short array syntax must be used to define arrays
 237 | ERROR   | [x] Short array syntax must be used to define arrays
 238 | ERROR   | [x] Short array syntax must be used to define arrays
 243 | ERROR   | [x] Short array syntax must be used to define arrays
 244 | ERROR   | [x] Short array syntax must be used to define arrays
 246 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 3 empty lines
 248 | ERROR   | [ ] More than 2 empty lines are not allowed
 252 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 254 | WARNING | [ ] Unused variable $key.
 259 | ERROR   | [x] Expected one space after the comma, 0 found
 263 | ERROR   | [x] Short array syntax must be used to define arrays
 263 | ERROR   | [x] Concat operator must be surrounded by a single space
 265 | ERROR   | [x] Concat operator must be surrounded by a single space
 265 | ERROR   | [x] Concat operator must be surrounded by a single space
 265 | ERROR   | [x] Concat operator must be surrounded by a single space
 265 | ERROR   | [x] Concat operator must be surrounded by a single space
 265 | ERROR   | [x] Concat operator must be surrounded by a single space
 272 | WARNING | [ ] Unused variable $test.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/jaykandari/work/drupal9/modules/contrib/image_popup/src/Plugin/Field/FieldFormatter/ImagePopupFieldFormatter.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 12 WARNINGS AFFECTING 23 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
   6 | WARNING | [x] Unused use statement
   8 | WARNING | [x] Unused use statement
  99 | ERROR   | [x] No space found before comment text; expected "// $container->get('entity.manager')->getStorage('image_style_popup')" but found
     |         |     "//$container->get('entity.manager')->getStorage('image_style_popup')"
 107 | ERROR   | [x] Short array syntax must be used to define arrays
 120 | ERROR   | [x] Short array syntax must be used to define arrays
 121 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 124 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 126 | ERROR   | [x] Short array syntax must be used to define arrays
 132 | ERROR   | [x] Short array syntax must be used to define arrays
 133 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 136 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 138 | ERROR   | [x] Short array syntax must be used to define arrays
 151 | ERROR   | [x] Short array syntax must be used to define arrays
 160 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 160 | ERROR   | [x] Short array syntax must be used to define arrays
 163 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 172 | ERROR   | [x] Short array syntax must be used to define arrays
 178 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 182 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 183 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 183 | ERROR   | [x] No space found before comment text; expected "// $image_style_popup_settings = entity_load('image_style', $image_style_popup);" but found "//$image_style_popup_settings =
     |         |     entity_load('image_style', $image_style_popup);"
 185 | WARNING | [ ] Unused variable $key.
 203 | ERROR   | [x] Concat operator must be surrounded by a single space
 203 | ERROR   | [x] Concat operator must be surrounded by a single space
 203 | ERROR   | [x] Concat operator must be surrounded by a single space
 203 | ERROR   | [x] Concat operator must be surrounded by a single space
 203 | ERROR   | [x] Concat operator must be surrounded by a single space
 204 | ERROR   | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/jaykandari/work/drupal9/modules/contrib/image_popup/src/Plugin/CKEditorPlugin/ImagePopup.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 3 WARNINGS AFFECTING 13 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
 24 | ERROR   | [x] Expected 0 spaces between parenthesis of function declaration; 1 found
 24 | ERROR   | [x] There should be no white space after an opening "("
 24 | ERROR   | [x] There should be no white space before a closing ")"
 39 | ERROR   | [x] Short array syntax must be used to define arrays
 48 | ERROR   | [x] Short array syntax must be used to define arrays
 49 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 50 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 58 | ERROR   | [x] Short array syntax must be used to define arrays
 59 | ERROR   | [x] Short array syntax must be used to define arrays
 60 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 76 | ERROR   | [x] Short array syntax must be used to define arrays
 81 | ERROR   | [ ] Doc comment short description must start with a capital letter
 89 | ERROR   | [x] Visibility must be declared on method "validateImageUploadSettings"
 90 | ERROR   | [x] Short array syntax must be used to define arrays
 90 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own line
 92 | ERROR   | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/jaykandari/work/drupal9/modules/contrib/image_popup/src/Controller/ImagePopup.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------
 21 | ERROR   | [x] Expected 1 blank line before function; 0 found
 22 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 36 | ERROR   | [x] Concat operator must be surrounded by a single space
 36 | ERROR   | [x] Concat operator must be surrounded by a single space
 36 | WARNING | [ ] Unused variable $img.
 37 | ERROR   | [x] No space found before comment text; expected "// return [" but found "//return ["
 37 | ERROR   | [x] Inline comments must start with a capital letter
 40 | ERROR   | [x] No space found before comment text; expected "// ];" but found "//];"
 40 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 41 | ERROR   | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

Time: 315ms; Memory: 10MB
CommentFileSizeAuthor
#2 3124707-2.patch28.82 KBmaithri shetty

Comments

Maithri Shetty created an issue. See original summary.

maithri shetty’s picture

Status: Active » Needs review
StatusFileSize
new28.82 KB
jaykandari’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Needs review » Needs work
Issue tags: +Novice, +DIACWSep2020

Patch doesn't apply. Needs reroll.

❯ curl https://www.drupal.org/files/issues/2020-04-03/3124707-2.patch | git apply 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 29513  100 29513    0     0  19003      0  0:00:01  0:00:01 --:--:-- 19003
error: README.txt: already exists in working directory
error: patch failed: image_popup.module:1
error: image_popup.module: patch does not apply
error: patch failed: image_popup.routing.yml:20
error: image_popup.routing.yml: patch does not apply
error: js/ckeditor.imagepopup.admin.js: already exists in working directory
error: js/plugins/imagepopup/icons/.DS_Store: already exists in working directory
error: js/plugins/imagepopup/icons/hidpi/imagepopup.png: already exists in working directory
error: js/plugins/imagepopup/icons/imagepopup.png: already exists in working directory
error: js/plugins/imagepopup/plugin.js: already exists in working directory
error: patch failed: src/Controller/ImagePopup.php:1
error: src/Controller/ImagePopup.php: patch does not apply
error: src/Form/EditorImagePopupDialog.php: already exists in working directory
error: src/Plugin/CKEditorPlugin/ImagePopup.php: already exists in working directory
error: patch failed: src/Plugin/Field/FieldFormatter/ImagePopupFieldFormatter.php:1
error: src/Plugin/Field/FieldFormatter/ImagePopupFieldFormatter.php: patch does not apply
                                                                                              
jaykandari’s picture

Issue summary: View changes
sivaprasadc’s picture

Assigned: Unassigned » sivaprasadc
jaykandari’s picture

Assigned: sivaprasadc » Unassigned
Status: Needs work » Fixed

Coding standards are already fixed in https://www.drupal.org/project/image_popup/issues/2933506 ticket. Thus marking this as Fixed.

I've unassigned @SivaprasadC as this ticket is no longer required.

Thank you all for the contributions.

sivaprasadc’s picture

Hi @JayKandari,

It seem like still .module file need to have a short array syntax. I have created path here

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.