Created on 14 April 2023, over 1 year ago
Updated 23 July 2024, 4 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India dineshkumarbollu

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

Comments & Activities

  • Issue created by @dineshkumarbollu
  • First commit to issue fork.
  • Status changed to Needs work 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @dineshkumarbollu,

    I applied patch #2 but encountered some errors.

    āžœ  workbench_notifier git:(8.x-1.x) curl https://www.drupal.org/files/issues/2023-04-14/codingstandards-2.patch | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 10400  100 10400    0     0  59503      0 --:--:-- --:--:-- --:--:-- 59770
    Checking patch README.md...
    error: README.md: No such file or directory
    Checking patch src/EventSubscriber/StateTransitionSubscriber.php...
    Checking patch src/Form/WorkbenchNotifierConfigurationForm.php...
    Checking patch workbench_notifier.info.yml...
    āžœ  workbench_notifier git:(8.x-1.x) ..
    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml workbench_notifier
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/workbench_notifier/workbench_notifier.info.yml
    -------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    -------------------------------------------------------------------------------------------------------------------
      1 | WARNING | "core_version_requirement" property is missing in the info.yml file
      9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     10 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     11 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/workbench_notifier/src/Form/WorkbenchNotifierConfigurationForm.php
    ----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 19 WARNINGS AFFECTING 18 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------
       8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\user\Entity\Role.
      38 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      39 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      40 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      44 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      49 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      49 | WARNING | [ ] Only string literals should be passed to t() where possible
      54 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      54 | WARNING | [ ] Only string literals should be passed to t() where possible
      64 | WARNING | [x] A comma should follow the last multiline array item. Found: 'workbench_notifier_transitions'
      89 | WARNING | [ ] Only string literals should be passed to t() where possible
     125 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     138 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     147 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     164 | WARNING | [ ] Role::loadMultiple calls should be avoided in classes, use dependency injection instead
     181 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     182 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     192 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     204 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     221 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/workbench_notifier/src/EventSubscriber/StateTransitionSubscriber.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 7 ERRORS AND 6 WARNINGS AFFECTING 13 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
       6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\workbench_moderation\Event\WorkbenchModerationEvents.
       7 | WARNING | [x] Unused use statement
       8 | WARNING | [x] Unused use statement
       9 | WARNING | [x] Unused use statement
      21 | ERROR   | [x] Visibility must be declared on method "getSubscribedEvents"
      44 | ERROR   | [ ] Missing parameter type
      46 | ERROR   | [ ] Missing parameter type
      48 | ERROR   | [ ] Missing parameter type
      50 | ERROR   | [ ] Missing parameter type
      52 | ERROR   | [ ] Missing parameter type
      59 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      84 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     114 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 179ms; Memory: 10MB
    
    āžœ  contrib

    Please check and advise.

    Thank you.

Production build 0.71.5 2024