Image Crop Widget module allow user to crop or rotate an image at the time of uploading an image for a node/user.

Project url

https://www.drupal.org/project/imagecroper

Comments

shashank5563 created an issue. See original summary.

vishal.kadam’s picture

Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

To reviewers: Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.

While this application is open, only the user who opened the application can make commits to the project used for the application.

Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.

shashank5563’s picture

Issue summary: View changes
Status: Active » Needs review
vishal.kadam’s picture

Issue summary: View changes
vishal.kadam’s picture

Status: Needs review » Needs work

1. Fix PHPCS issues.

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

FILE: imagecroper/imager_widget/css/imager_widget.css
--------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------------
  2 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  6 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  7 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  8 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  8 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 16 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 18 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: imagecroper/imager_widget/src/Plugin/Field/FieldWidget/ImagerWidget.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 180 | WARNING | [ ] Unused variable $file.
 213 | ERROR   | [x] Expected 1 space after "="; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

2. FILE: imager_widget/src/Plugin/Field/FieldWidget/ImagerWidget.php

// $container->get('image.factory')

// $container->get('entity_type.manager')

Remove commented code.

3. Since the project machine name (its short name as indicated in https://www.drupal.org/project/imagecroper) is imagecroper the module must contain the imagecroper.module, imagecroper.info.yml and imagecroper.libraries.yml files. All the functions (not the methods) implemented by the module must have a name starting with imagecroper_. The namespaces used by the modules need to start with Drupal\imagecroper\.
The project machine name cannot be changed anymore; those files, all the functions, and the namespaces must be renamed.

shashank5563’s picture

Status: Needs work » Needs review

@vishal.kadam, I have update the code. Please review.

vishal.kadam’s picture

@shashank5563,

I have reviewed the changes, and they look fine to me.

Let’s wait for other reviewers to take a look and if everything goes fine, you will get the role.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Needs review » Reviewed & tested by the community

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the reviewers.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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