Created on 13 July 2023, over 1 year ago
Updated 2 July 2024, 5 months ago

Problem/Motivation

robert@pc:~/lando-projects/age-attraction2.localhost(AA-21)$ lando phpcs web/modules/contrib/commerceuserpoints/

FILE: .../modules/contrib/commerceuserpoints/commerce_user_points.install
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 61 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...mmerceuserpoints/src/EventSubscriber/OrderCompleteSubscriber.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
 63 | WARNING | Unused variable $userPoints.
 70 | WARNING | Unused variable $userPoints.
 78 | WARNING | Unused variable $orderTotal.
 80 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 81 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 82 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------


FILE: ...b/modules/contrib/commerceuserpoints/src/ReferralLinkService.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
 17 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 28 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 46 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 49 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------


FILE: ...commerceuserpoints/src/Form/ThresholdAmountConfigurationForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
  63 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  71 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
  74 | WARNING | Unused variable $roles_field.
  97 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 105 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 107 | WARNING | Unused variable $roleDetails.
 127 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
----------------------------------------------------------------------


FILE: ...trib/commerceuserpoints/src/Form/UserPointsConfigurationForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 24 WARNINGS AFFECTING 24 LINES
----------------------------------------------------------------------
  82 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  83 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  92 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  93 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  94 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  95 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  96 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  97 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  98 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 103 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 105 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 123 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
 159 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 160 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 169 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 170 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 171 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 172 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 173 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 174 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 175 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 180 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 182 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 215 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
----------------------------------------------------------------------


FILE: .../commerceuserpoints/src/Form/ReferralPointsConfigurationForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
  63 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  76 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
  89 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
 107 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 119 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 143 | WARNING | Role::loadMultiple calls should be avoided in
     |         | classes, use dependency injection instead
----------------------------------------------------------------------


FILE: ...dules/contrib/commerceuserpoints/src/Controller/ReferralLink.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
 19 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 21 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 24 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 29 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 32 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 35 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------


FILE: ...ontrib/commerceuserpoints/src/Plugin/Block/ReferralLinkBlock.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 37 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 39 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------


FILE: ...erpoints/src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
----------------------------------------------------------------------
 115 | WARNING | Unused variable $roles.
 116 | WARNING | Unused variable $role.
 136 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 137 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 150 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 152 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 177 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 277 | WARNING | Unused variable $paymentInformation.
 361 | WARNING | Unused variable $key.
 416 | WARNING | Unused variable $nodeId.
----------------------------------------------------------------------


FILE: ...b/modules/contrib/commerceuserpoints/commerce_user_points.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 38 | WARNING | Unused variable $role_order_point_discount.
 39 | WARNING | Unused variable $role_date_discount.
----------------------------------------------------------------------

Time: 462ms; Memory: 14MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

9.0

Component

Code

Created by

🇸🇰Slovakia kaszarobert

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

  • Issue created by @kaszarobert
  • Assigned to Shreya_98
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Shreya_98

    @kaszarobert I have fixed all the code style issues successfully .Kindly review the patch file as well as attached screenshot .

  • Status changed to Needs work about 1 year ago
  • 🇵🇭Philippines clarkssquared

    Hi Shreya_th,

    I applied your patch #3 into my local but your patch fails to apply and below is the output that is shown in my terminal:

    100  6134  100  6134    0     0    840      0  0:00:07  0:00:07 --:--:--  1379
    Checking patch commerce_user_points.info.yml...
    error: while searching for:
    type: module
    description: 'Provides User Points functionality with Commerce.'
    package: Commerce (contrib)
    dependencies:
      - drupal:commerce
    configure: commerce_user_points.admin_settings
    core: '8.x'
    
    error: patch failed: commerce_user_points.info.yml:2
    error: commerce_user_points.info.yml: patch does not apply
    Checking patch commerce_user_points.module...
    warning: commerce_user_points.module has type 100755, expected 100644
    error: while searching for:
      switch ($key) {
        case 'commerce_user_points':
          $message['from'] = \Drupal::config('system.site')->get('mail');
          $message['subject'] = t($params['subject']);
          $message['body'][] = $params['message'];
          break;
      }
    
    error: patch failed: commerce_user_points.module:92
    error: commerce_user_points.module: patch does not apply
    Checking patch src/EventSubscriber/OrderCompleteSubscriber.php...
    warning: src/EventSubscriber/OrderCompleteSubscriber.php has type 100755, expected 100644
    error: while searching for:
    
    namespace Drupal\commerce_user_points\EventSubscriber;
    
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    use Drupal\state_machine\Event\WorkflowTransitionEvent;
    use Drupal\Core\Entity\EntityTypeManager;
    
    /**
     * Class OrderCompleteSubscriber.
     *
     * @package Drupal\commerce_user_points
     */
    
    error: patch failed: src/EventSubscriber/OrderCompleteSubscriber.php:2
    error: src/EventSubscriber/OrderCompleteSubscriber.php: patch does not apply
    Checking patch src/Form/UserPointsConfigurationForm.php...
    warning: src/Form/UserPointsConfigurationForm.php has type 100755, expected 100644
    error: while searching for:
    namespace Drupal\commerce_user_points\Form;
    
    use Drupal\Core\Form\ConfigFormBase;
    use Symfony\Component\HttpFoundation\Request;
    use Drupal\Core\Form\FormStateInterface;
    
    /**
     * Defines a form that configures forms module settings.
    
    error: patch failed: src/Form/UserPointsConfigurationForm.php:3
    error: src/Form/UserPointsConfigurationForm.php: patch does not apply
    Checking patch src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php...
    warning: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php has type 100755, expected 100644
    error: while searching for:
    
    namespace Drupal\commerce_user_points\Plugin\Commerce\CheckoutPane;
    
    use Drupal\commerce_store\Entity\Store;
    use Drupal\commerce_product\Entity\Product;
    use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase;
    use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneInterface;
    use Drupal\Core\Form\FormStateInterface;
    use Drupal\commerce_order\Adjustment;
    use Drupal\commerce_price\Price;
    
    /**
     * Provides the CommerceUserPoints.
    
    error: patch failed: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php:2
    error: src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php: patch does not apply
    

    Please also look at the screenshot I attached for your refrerence.

    Thank you

  • Assigned to Shreya_98
  • 🇮🇳India Shreya_98

    Hi @clarkssquared , working on this update you asap.

  • First commit to issue fork.
  • Merge request !11fixed code style → (Open) created by shubham_jain
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India shubham_jain

    Hi, I have raised new PR as the patch provided by @shreya_th did not included all the fixes and was unable to apply.

    Please review and verify.

  • Status changed to Needs work 8 months ago
  • 🇮🇳India Ashutosh Ahirwal India

    Hi have reviewed the MR but its still showing so many errors.
    moving to need work

    Used command
    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/commerceuserpoints

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/commerce_user_points.info.yml
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
    1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
    1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
    1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
    6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    -------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/commerce_user_points.module
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------
    38 | WARNING | Unused variable $role_order_point_discount.
    39 | WARNING | Unused variable $role_date_discount.
    -----------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/ReferralPointsConfigurationForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
    63 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    89 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    107 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    143 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/ThresholdAmountConfigurationForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
    63 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    71 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    74 | WARNING | Unused variable $roles_field.
    97 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    105 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    107 | WARNING | Unused variable $roleDetails.
    127 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Form/UserPointsConfigurationForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 24 WARNINGS AFFECTING 24 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
    82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    92 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    93 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    94 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    95 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    96 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    97 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    103 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    105 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    123 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    159 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    160 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    169 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    170 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    171 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    172 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    173 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    174 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    175 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    180 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    182 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    215 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Plugin/Commerce/CheckoutPane/CommerceUserPoints.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    115 | WARNING | Unused variable $roles.
    116 | WARNING | Unused variable $role.
    136 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    137 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    150 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    152 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    177 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    277 | WARNING | Unused variable $paymentInformation.
    361 | WARNING | Unused variable $key.
    416 | WARNING | Unused variable $nodeId.
    ---------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Plugin/Block/ReferralLinkBlock.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
    37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    39 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/Controller/ReferralLink.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
    ---------------------------------------------------------------------------------------------------------------------------
    19 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    24 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    29 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    35 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/EventSubscriber/OrderCompleteSubscriber.php
    -------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------
    63 | WARNING | Unused variable $userPoints.
    70 | WARNING | Unused variable $userPoints.
    78 | WARNING | Unused variable $orderTotal.
    80 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    81 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    82 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/commerceuserpoints/src/ReferralLinkService.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    -----------------------------------------------------------------------------------------------------------------------
    17 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    28 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    46 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    49 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------------------------------

    Time: 467ms; Memory: 12MB

  • First commit to issue fork.
  • Assigned to akshaydalvi212
  • 🇮🇳India akshaydalvi212

    will work on this and update the PR.

  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • 🇮🇳India akshaydalvi212

    Updated the code and raised the PR.
    only unused variable warnings remain.
    kindly review the PR changes.

  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    Only remaining issue:

    FILE: /contribution/commerceuserpoints-3374300/src/EventSubscriber/OrderCompleteSubscriber.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------
     74 | WARNING | Unused variable $userPoints.
     81 | WARNING | Unused variable $userPoints.
     89 | WARNING | Unused variable $orderTotal.
    --------------------------------------------------------------------------------------------------------------------
    
    Time: 110ms; Memory: 8MB
    
  • 🇮🇳India nitin_lama India

    Please review.

  • Issue was unassigned.
  • Status changed to Needs work 8 months ago
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    Many meaningless comments are being added in the MR. When adding a code comment it should clarify something or add value to the user reading the code.

  • Assigned to akshaydalvi212
  • 🇮🇳India akshaydalvi212

    Will work on the added comment in the PR.

  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • 🇮🇳India akshaydalvi212

    Updated the comments and removed the mentioned code.
    kindly review the PR.

  • Status changed to Fixed 5 months ago
  • 🇮🇳India jigish.addweb

    Thanks for the help these issues has been resolved in new alpha release, if you still see these errors please create a new issue against 3.x branch.

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

Production build 0.71.5 2024