Problem/Motivation

FILE: modules/recurly/recurly.api.php
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
112 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyEntityOperations.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 7 WARNINGS AFFECTING 11 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
71 | ERROR | The array declaration extends to column 103 (the limit is 80). The array content should be split up over multiple lines
77 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
83 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
85 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
85 | ERROR | The array declaration extends to column 149 (the limit is 80). The array content should be split up over multiple lines
86 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
86 | ERROR | The array declaration extends to column 139 (the limit is 80). The array content should be split up over multiple lines
94 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
129 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
150 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
153 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
155 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyTokenManager.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Plugin/views/field/AccountCode.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
62 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Access/RecurlyAccess.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------
125 | ERROR | The array declaration extends to column 110 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlySubscriptionSelectPlanController.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
72 | WARNING | [ ] Exceptions should not be translated
79 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlyController.php
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
39 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
54 | ERROR | [ ] Parameter $clientFactory is not described in comment
61 | ERROR | [ ] Doc comment for parameter $client does not match actual variable name $clientFactory
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlyInvoicesController.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
29 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
66 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
85 | WARNING | [x] '@TODO' should match the format '@todo Fix problem X here.'
113 | ERROR | [x] Use null coalesce operator instead of ternary operator.
130 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlySubscriptionListController.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
42 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
45 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
194 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
194 | WARNING | [x] A comma should follow the last multiline array item. Found: )
243 | ERROR | [ ] The array declaration extends to column 241 (the limit is 80). The array content should be split up over multiple lines
332 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
332 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlySubscriptionReactivateController.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
27 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Controller/RecurlyPushListenerController.php
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
92 | WARNING | Unused variable $entity.
-----------------------------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyPreprocess.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 7 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------
124 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
146 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
146 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
146 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
151 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
154 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
187 | WARNING | Unused variable $invoice_account.
206 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyUrlManager.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyClientFactory.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
65 | ERROR | The text '@deprecated in recurly 8.x-1.x Use \Drupal\recurly\RecurlyClient::getClientFromSettings() instead. It's better to get an initialized client object and pass it as an argument to
| | Recurly_* resource classes than rely on the global \Recurly_Client.' does not match the standard format: @deprecated in %deprecation-version% and is removed from %removal-version%.
| | %extra-info%.
65 | ERROR | Each @deprecated tag must have a @see tag immediately following it
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Form/RecurlySettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
160 | WARNING | [ ] #options values usually have to run through t() for translation
306 | WARNING | [x] '@TODO: Convert these array keys to class constants.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Form/RecurlySubscriptionCancelConfirmForm.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
28 | WARNING | [x] '@TODO:' should match the format '@todo Fix problem X here.'
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Form/RecurlyRedeemCouponForm.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------
31 | ERROR | The array declaration extends to column 106 (the limit is 80). The array content should be split up over multiple lines
86 | ERROR | The array declaration extends to column 114 (the limit is 80). The array content should be split up over multiple lines
109 | ERROR | The array declaration extends to column 116 (the limit is 80). The array content should be split up over multiple lines
124 | ERROR | The array declaration extends to column 117 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Form/RecurlySubscriptionChangeConfirmForm.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------
31 | WARNING | [x] '@TODO:' should match the format '@todo Fix problem X here.'
65 | WARNING | [x] 'TODO: We could potentially calculate the charge/credit amount here, but' should match the format '@todo Fix problem X here.'
--------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/Form/RecurlySubscriptionPlansForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
116 | ERROR | [x] Use null coalesce operator instead of ternary operator.
117 | ERROR | [x] Use null coalesce operator instead of ternary operator.
171 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/src/RecurlyFormatManager.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 9 WARNINGS AFFECTING 14 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
14 | WARNING | [ ] Global constants should not be used, move it to a class or interface
15 | WARNING | [ ] Global constants should not be used, move it to a class or interface
16 | WARNING | [ ] Global constants should not be used, move it to a class or interface
17 | WARNING | [ ] Global constants should not be used, move it to a class or interface
18 | WARNING | [ ] Global constants should not be used, move it to a class or interface
19 | WARNING | [ ] Global constants should not be used, move it to a class or interface
20 | WARNING | [ ] Global constants should not be used, move it to a class or interface
21 | WARNING | [ ] Global constants should not be used, move it to a class or interface
25 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
132 | ERROR | [x] Use null coalesce operator instead of ternary operator.
132 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
135 | ERROR | [x] Use null coalesce operator instead of ternary operator.
136 | ERROR | [x] Use null coalesce operator instead of ternary operator.
137 | ERROR | [x] Use null coalesce operator instead of ternary operator.
138 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/recurly.routing.yml
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
19 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
26 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurly_hosted/src/Controller/RecurlyHostedAccountRedirectController.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
24 | ERROR | The array declaration extends to column 112 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurly_hosted/recurly_hosted.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
4 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/src/Routing/RecurlyJsRouteSubscriber.php
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/src/Controller/RecurlyJsSubscriptionSignupController.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Doc comment short description must end with a full stop
59 | ERROR | [ ] The array declaration extends to column 103 (the limit is 80). The array content should be split up over multiple lines
64 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request instead
67 | ERROR | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
73 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request instead
90 | WARNING | [ ] Unused variable $plan.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/src/Form/RecurlyJsUpdateBillingForm.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
45 | ERROR | [ ] The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
97 | ERROR | [ ] The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/src/Form/RecurlyJsFormBase.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 5 WARNINGS AFFECTING 12 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
43 | ERROR | [x] Expected "\Drupal\recurly\RecurlyFormatManager" but found "\Drupal\recurly\RecurlyFormatManager;" for @var tag in member variable comment
50 | ERROR | [x] Expected "\Recurly_BillingInfo" but found "\Recurly_BillingInfo;" for @var tag in member variable comment
67 | ERROR | [x] Expected 1 space between type hint and argument "$country_manager"; 7 found
69 | ERROR | [x] Expected 1 space between type hint and argument "$recurly_client_factory"; 10 found
70 | ERROR | [x] Expected 1 space between type hint and argument "$format_manager"; 10 found
156 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
184 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
204 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
205 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
346 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
348 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
348 | ERROR | [ ] Description for the @return value is missing
---------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/src/Form/RecurlyJsSubscribeForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
28 | WARNING | [x] '@TODO: Replace exception.' should match the format '@todo Fix problem X here.'
62 | WARNING | [x] A comma should follow the last multiline array item. Found: '

Add-ons

'
81 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
123 | ERROR | [x] Short array syntax must be used to define arrays
137 | WARNING | [x] A comma should follow the last multiline array item. Found: 'coupon'
164 | ERROR | [ ] The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/tests/src/FunctionalJavascript/RecurlyJsBillingFormTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Concat operator must be surrounded by a single space
41 | ERROR | [x] Concat operator must be surrounded by a single space
46 | ERROR | [x] Concat operator must be surrounded by a single space
133 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
133 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/tests/src/FunctionalJavascript/RecurlyJsSubscribeFormTest.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | [x] Concat operator must be surrounded by a single space
122 | ERROR | [x] Missing function doc comment
131 | ERROR | [x] Concat operator must be surrounded by a single space
138 | ERROR | [x] Concat operator must be surrounded by a single space
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/modules/recurlyjs/recurlyjs.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
4 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------

FILE: modules/recurly/recurly.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 9 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
166 | ERROR | [ ] The array declaration extends to column 104 (the limit is 80). The array content should be split up over multiple lines
168 | ERROR | [ ] The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
218 | ERROR | [x] Expected newline after closing brace
264 | WARNING | [ ] Unused variable $remote_account.
331 | ERROR | [ ] The array declaration extends to column 165 (the limit is 80). The array content should be split up over multiple lines
335 | ERROR | [ ] The array declaration extends to column 161 (the limit is 80). The array content should be split up over multiple lines
493 | ERROR | [ ] The array declaration extends to column 88 (the limit is 80). The array content should be split up over multiple lines
526 | ERROR | [x] Use null coalesce operator instead of ternary operator.
548 | ERROR | [x] Case breaking statements must be followed by a single blank line
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/recurly.install
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
158 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: modules/recurly/recurly.views.inc
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------
96 | ERROR | The array declaration extends to column 142 (the limit is 80). The array content should be split up over multiple lines
127 | ERROR | The array declaration extends to column 128 (the limit is 80). The array content should be split up over multiple lines
133 | ERROR | The array declaration extends to column 115 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/tests/modules/recurly_test_client/recurly_test_client.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] You must use "/**" style comments for a file comment
18 | WARNING | [x] '@todo: Remove this when the Recurly client is updated.' should match the format '@todo Fix problem X here.'
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------

FILE: modules/recurly/tests/modules/recurly_test_client/README.md
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 277 characters
17 | WARNING | Line exceeds 80 characters; contains 229 characters
------------------------------------------------------------------------------------------

Time: 2.85 secs; Memory: 16MB

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

Check the @deprecated in this file recurly/src/RecurlyClientFactory.php

User interface changes

API changes

Data model changes

Issue fork recurly-3267917

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Mohammad Fayoumi created an issue. See original summary.

mohammad-fayoumi’s picture

Issue summary: View changes
mohammad-fayoumi’s picture

Status: Active » Needs review
marciaibanez’s picture

Assigned: Unassigned » marciaibanez

I'll review this.

marciaibanez’s picture

Assigned: marciaibanez » Unassigned

Hello! I tested the changes and everything looks good, but when I ran phpcs I got some errors, so I ran phpcbf to fix these and now all errors and warnings are gone. If I did anything wrong or if I can do something else to help, please let me know. Kindly review it :)

mohammad-fayoumi’s picture

Issue summary: View changes
Guilherme Rabelo’s picture

Assigned: Unassigned » Guilherme Rabelo

I will review this last commit.

Guilherme Rabelo’s picture

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

Hi i reviewed the last commit with the phpcs command and showed no coding standards messages.
Moving to RTBC!

mohammad-fayoumi’s picture

Status: Reviewed & tested by the community » Needs work
mohammad-fayoumi’s picture

Thanks for completing the work on the last commit, but I see you've removed the deprecated message in this class recurly/src/RecurlyClientFactory.php and this isn't the best practice, so I just re-added & tested it without any Codesniffer errors.

marciaibanez’s picture

Hi @Mohammad Fayoumi, yes, I didn't know wxactly how to fix that so I just removed it, good to know it! Thank you for the explanation :)

mohammad-fayoumi’s picture

Status: Needs work » Needs review
marciaibanez’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, so I'm moving it to RTBC. Thanks!

eojthebrave’s picture

Status: Reviewed & tested by the community » Needs work

Thanks everyone for working on this.

Looks like this is going to need to be rebased before it can be merged due to other conflicting commits being added.

avpaderno’s picture

Issue tags: -, -code cleanup +Coding standards, +Needs issue summary update

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.

avpaderno’s picture

Title: Resolve PHPCS errors and warnings » Fix the issues reported by phpcs
indrapatil’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update
indrapatil’s picture

avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
 dependencies:
-  - recurly
+  - drupal:recurly

The Recurly module is not a Drupal core module.

-    if ($recurly_account = recurly_account_load(['entity_type' => $entity_type_id, 'entity_id' => $entity->id()])) {
+    if ($recurly_account = recurly_account_load(
+        ['entity_type' => $entity_type_id, 'entity_id' => $entity->id()]
+    )) {
-        if ($url = recurly_url('select_plan', ['entity_type' => $entity_type, 'entity' => $entity])) {
+        if ($url = recurly_url('select_plan',
+            ['entity_type' => $entity_type, 'entity' => $entity])) {
           return $this->redirect($url->getRouteName(), $url->getRouteParameters());


Control structure conditions may exceed 80 characters, if they are simple to read and understand
.

-/**
- * RecurlyFormatManager.
+ * Factory for format manager of Recurly RecurlyFormatManager class.

How can a class be a factory for itself?

himanshu_jhaloya made their first commit to this issue’s fork.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya
Status: Needs work » Needs review
himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
avpaderno’s picture

Status: Needs review » Needs work
-    if ($recurly_account = recurly_account_load(['entity_type' => $entity_type_id, 'entity_id' => $entity->id()])) {
+    if ($recurly_account = recurly_account_load([
+      'entity_type' => $entity_type_id,
+      'entity_id' => $entity->id(),
+    ]
+    )) {
       if ($url = recurly_hosted_account_manage_url($recurly_account, TRUE)) {

Control structure conditions may exceed 80 characters, if they are simple to read and understand. That code is formatted following the PSR12 coding standards, not the Drupal coding standards.

 description: 'Provides a Form API Recurly.js field and integration with the Field and Entity systems.'
 dependencies:
-  - recurly
+  - drupal:recurly

The Recurly module is not a Drupal core module.

+  /**
+   * The state store.
+   *
+   * @var Drupal\Core\State\State
+   */
+  protected $state;
+
    *   The Recurly format manager.
+   * @param \Drupal\Core\State\State $state
+   *   The object State.

The first description is better. Parameters are not described as being objects. That is something already said from the @param line.

   public function __construct(
     CountryManagerInterface $country_manager,
     ContainerAwareEventDispatcher $event_dispatcher,
     RecurlyClientFactory $client,
-    RecurlyFormatManager $format_manager
+    RecurlyFormatManager $format_manager,
+    State $state
   ) {
     $this->countryManager = $country_manager;
     $this->eventDispatcher = $event_dispatcher;
     $this->recurlyClient = $client;
     $this->formatManager = $format_manager;
+    $this->state = $state;
   }

Function/method declarations are written in a single line, as per Drupal coding standards.

eojthebrave’s picture

Version: 4.x-dev » 5.x-dev

eojthebrave’s picture

Status: Needs work » Needs review

Thank you to everyone who has helped work on this so far. It's a big undertaking. And will be nice to have it completed.

I created a new MR using the previously created MR in #20. It was quite a bit behind the 4.x branch and needed some updates. I made the new MR against the 5.x branch which targets Drupal 9 and 10. And it's now updated and passing the GitLab PHPCS checks.

I also created another MR against the 4.x branch. Which is for Drupal 8 and 9. With the same updates. And it's also passing the GitLab PHPCS checks.

I recommend reviewing the 3267917-5x-phpcs-cleanup branch. The other one is the same changes backported to the slightly older code in the 4.x branch.

My current plan is to get this merged in. And then create a 5.0.0 release so there's a Drupal 10 compatible stable release of the module.

  • eojthebrave committed d3bf3bc9 on 5.x
    Issue #3267917 by eojthebrave, Mohammad-Fayoumi, marciaibanez, apaderno...

  • eojthebrave committed 12355153 on 5.x
    Issue #3267917: Fix one remaining issue in RecurlyEntityOperations.php
    

  • eojthebrave committed fb713b3c on 4.x
    Issue #3267917 by eojthebrave, Mohammad-Fayoumi, marciaibanez, apaderno...
eojthebrave’s picture

Status: Needs review » Fixed

Both the 4.x and 5.x branches are now passing the phpcs scans done by GitLab CI, and there's a different issue for dealing with the 7.x-2.x branch here https://www.drupal.org/project/recurly/issues/2872780. And the 8.x-X branch isn't seeing active development anymore so not likely to ever get these changes.

I think we can close this issue now. Thank you to everyone that has contributed to getting the code cleaned up.

eojthebrave’s picture

Status: Fixed » Closed (fixed)

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