Problem/Motivation

The Drupal coding standard issue fixes.

FILE: .../innoppl/Desktop/commerce_razorpay/src/Controller/Controller.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 33 | WARNING | There must be no blank line following an inline
    |         | comment
 62 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
 66 | WARNING | t() calls should be avoided in classes, use
    |         | dependency injection and $this->t() instead
----------------------------------------------------------------------


FILE: ...ommerce_razorpay/src/PluginForm/OffsiteRedirect/RazorpayForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 30 | WARNING | Unused variable $owner.
 34 | WARNING | Unused variable $billing_profile.
----------------------------------------------------------------------


FILE: ...razorpay/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
 81 | WARNING | Unused variable $refund_status.
 82 | WARNING | Unused variable $amount_refunded.
 83 | WARNING | Unused variable $service_tax.
 84 | WARNING | Unused variable $amount.
----------------------------------------------------------------------


FILE: .../innoppl/Desktop/commerce_razorpay/commerce_razorpay.routing.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | WARNING | Open page callback found, please add a comment before
   |         | the line why there is no access restriction
----------------------------------------------------------------------

Time: 60ms; Memory: 4Mb

Proposed resolution

Fix the coding standard issues.

Remaining tasks

Nil

User interface changes

None

API changes

Nil

Data model changes

Nil

Comments

arunkumark created an issue. See original summary.

arunkumark’s picture

Status: Active » Needs review
StatusFileSize
new2.54 KB

Created the patch to resolve the coding standard issue.

krina.addweb’s picture

Status: Needs review » Needs work
StatusFileSize
new1.05 MB

@arunkumark, it would be good if you solve all the errors shown in Preview report. I attached the screenshot for the same.

Deepthi kumari’s picture

Status: Needs work » Needs review
StatusFileSize
new11.99 KB

Fixed the coding standard errors. Applied the patch, needs review.

ankitjain28may’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new179.36 KB
new193.64 KB

Patch #4 is applied successfully and fixing all the errors, attached images before and after the patch. Thanks, Marking it RTBC.

i-trokhanenko’s picture

Assigned: Unassigned » i-trokhanenko
i-trokhanenko’s picture

Assigned: i-trokhanenko » Unassigned
Status: Reviewed & tested by the community » Needs work

I can't apply patch #4 to the current module version, please update. Thanks!

i-trokhanenko’s picture

saphemmy’s picture

Assigned: Unassigned » saphemmy
libbna’s picture

@saphemmy are you still working on this issue?

chakkche’s picture

@saphemmy are you still working on this issue?

saphemmy’s picture

Assigned: saphemmy » Unassigned
chakkche’s picture

Assigned: Unassigned » chakkche

I will work on this.

chakkche’s picture

Assigned: chakkche » Unassigned
Status: Needs work » Needs review
StatusFileSize
new15.36 KB

Below patch fixes the coding standard issues.

libbna’s picture

Status: Needs review » Needs work
StatusFileSize
new40.76 KB

Applied #14 patch and found these errors.

chakkche’s picture

Assigned: Unassigned » chakkche
chakkche’s picture

Assigned: chakkche » Unassigned
Status: Needs work » Needs review
libbna’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new32.82 KB

I have reviewed #14 patch again and this time I found no errors. Last time I must have tested on wrong version.

Added a screenshot and marking it as RTBC.

nehajyoti’s picture

@libnna, check the functionality as well after applying the patch.

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Needs review
lucasbaralm’s picture

Status: Needs review » Needs work

Patch failed to apply on 8.x-1.x, moving to Needs Work.
Output:

error: patch failed: src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php:33
error: src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php: patch does not apply
mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new15.1 KB

Rerolled patch #14 for 8.x-1.x, please review it.

lucasbaralm’s picture

Status: Needs review » Reviewed & tested by the community

The patch applied cleanly and resolved the remaining code standard issues, not modifying the module functionality. Running phpcs there was only one warning remaining not relevant. Moving to RTBC.

FILE: .../commerce_razorpay/src/Plugin/Commerce/PaymentGateway/RazorpayRedirect.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 59 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------
nehajyoti’s picture

Status: Reviewed & tested by the community » Needs work

from patch #22.

Please fix the typo on line number 79 of RazorpayForm.php file.

 /**
+   * Empty Build of refirect form.
+   */
lucassc’s picture

Status: Needs work » Needs review
StatusFileSize
new15.1 KB
new416 bytes

Typo fixed.

vitorbs’s picture

Assigned: Unassigned » vitorbs

I'll review.

vitorbs’s picture

The #25 patch fixes the typo from the #22 patch, now the word "redirect" is correct, moving to RTBC.

vitorbs’s picture

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

  • nehajyoti committed 3d883b7 on 8.x-1.x
    Issue #2959041 by lucassc, chakkche, arunkumark, mrinalini9, Deepthi...
nehajyoti’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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