- 🇵🇭Philippines cleavinjosh
Hi @urvashi_vora,
I applied patch #5, it was applied smoothly and fixed most of the phpcs issues.
These are the remaining issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
:➜ opigno_learning_path git:(8.x-1.x) curl https://www.drupal.org/files/issues/2022-07-16/coding-standards-3293312-5.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 87287 100 87287 0 0 211k 0 --:--:-- --:--:-- --:--:-- 211k patching file css/iframe_opigno_lp_manager.css patching file css/opigno_learning_path_achievements.css patching file css/opigno_learning_path_member_add.css patching file css/opigno_learning_path_progress.css patching file css/opigno_learning_path_training_content.css patching file modules/opigno_alter_entity_autocomplete/opigno_alter_entity_autocomplete.info.yml patching file modules/opigno_alter_entity_autocomplete/src/Controller/EntityAutocompleteController.php patching file modules/opigno_alter_entity_autocomplete/src/EntityAutocompleteMatcherOverride.php patching file modules/opigno_alter_entity_autocomplete/src/Routing/AutocompleteRouteSubscriber.php patching file opigno_learning_path.config_translation.yml patching file opigno_learning_path.info.yml patching file opigno_learning_path.install patching file opigno_learning_path.links.menu.yml patching file opigno_learning_path.module patching file opigno_learning_path.routing.yml patching file src/Annotation/LearningPathContentType.php patching file src/Annotation/LearningPathMembers.php patching file src/Controller/LearningPathAchievementController.php patching file src/Controller/LearningPathContentController.php patching file src/Controller/LearningPathController.php patching file src/Controller/LearningPathManagerController.php patching file src/Controller/LearningPathMembershipController.php patching file src/Controller/LearningPathStepsController.php patching file src/Entity/LPManagedContent.php patching file src/Entity/LPResult.php patching file src/Entity/LatestActivity.php patching file src/Form/LearningPathAdminSettingsForm.php patching file src/Form/LearningPathCreateClassForm.php patching file src/Form/LearningPathCreateUserForm.php patching file src/Form/LearningPathMembersForm.php patching file src/LPStatusInterface.php patching file src/LatestActivityInterface.php patching file src/LearningPathAccess.php patching file src/LearningPathContent.php patching file src/LearningPathContentTypesManager.php patching file src/LearningPathMembersPluginInterface.php patching file src/LearningPathValidator.php patching file src/LpSteps.php patching file src/Plugin/Block/StepsBlock.php patching file src/Plugin/views/field/OpignoLearningPathProgress.php patching file src/Progress.php patching file src/TwigExtension/DefaultTwigExtension.php patching file templates/opigno-learning-path-training-course-content.html.twig patching file tests/modules/opigno_learning_path_test/opigno_learning_path_test.info.yml patching file tests/src/Functional/LearningPathBrowserTestBase.php patching file tests/src/Functional/OpignoLinkConditionTest.php patching file tests/src/Functional/TrainingAccessTest.php patching file tests/src/Functional/TrainingCompleteTest.php patching file tests/src/Functional/TrainingContentTrait.php patching file tests/src/FunctionalJavascript/LearningPathWebDriverTestBase.php ➜ opigno_learning_path git:(8.x-1.x) ✗ .. ➜ contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml opigno_learning_path FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/opigno_learning_path.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 5 ERRORS AFFECTING 5 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget. 1120 | ERROR | [x] Use null coalesce operator instead of ternary operator. 3111 | ERROR | [x] Use null coalesce operator instead of ternary operator. 3506 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 3594 | ERROR | [x] Use null coalesce operator instead of ternary operator. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/tests/src/Functional/TrainingAccessTest.php ------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------- 108 | WARNING | Line exceeds 80 characters; contains 93 characters ------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/opigno_learning_path.install ------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\FileStorage. ------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/modules/opigno_alter_entity_autocomplete/src/EntityAutocompleteMatcherOverride.php ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Html. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathValidator.php ----------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------- 14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 59 | WARNING | Line exceeds 80 characters; contains 120 characters ----------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathMembersPluginBase.php ------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------- 12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 18 | WARNING | Possible useless method overriding detected 40 | ERROR | Function return type is not void, but function has no return statement ------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Form/LearningPathAdminSettingsForm.php -------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ModuleHandlerInterface. -------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Form/LearningPathCreateClassForm.php ---------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Ajax\HtmlCommand. 167 | ERROR | [x] list(...) is forbidden, use [...] instead. ---------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Form/LearningPathCreateUserForm.php ---------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------- 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\EmailValidator. ---------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Form/LearningPathMembersForm.php --------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\DependencyInjection\ContainerInterface. --------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Progress.php ---------------------------------------------------------------------------------------------------------------------------------------------- FOUND 20 ERRORS AND 8 WARNINGS AFFECTING 28 LINES ---------------------------------------------------------------------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\group\Entity\Group. 42 | ERROR | [ ] Class property $request_stack should use lowerCamel naming without underscores 53 | ERROR | [ ] Parameter $account_id is not described in comment 58 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $latest_cert_date 77 | ERROR | [ ] Parameter $account_id is not described in comment 82 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $latest_cert_date 113 | ERROR | [ ] Parameter $account_id is not described in comment 118 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $class 123 | ERROR | [ ] Parameter comment must start with a capital letter 135 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 158 | ERROR | [ ] Parameter $account_id is not described in comment 163 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $class 168 | ERROR | [ ] Parameter comment must start with a capital letter 181 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 226 | ERROR | [ ] Parameter $account_id is not described in comment 231 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $latest_cert_date 242 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 244 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 436 | ERROR | [x] Use null coalesce operator instead of ternary operator. 470 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 498 | ERROR | [ ] No key specified for array entry; first entry specifies key 504 | ERROR | [ ] Parameter $account_id is not described in comment 509 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $latest_cert_date 543 | ERROR | [ ] Parameter $account_id is not described in comment 548 | ERROR | [ ] Doc comment for parameter $uid does not match actual variable name $latest_cert_date 559 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 562 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 654 | 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: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/JoinService.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityFormBuilderInterface. 11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name ------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPResult.php -------------------------------------------------------------------------------------------------------------------------------- FOUND 3 ERRORS AFFECTING 3 LINES -------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase. 41 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 195 | ERROR | [ ] Public method name "LPResult::getCurrentLPAttempt" is not in lowerCamel format -------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPManagedContent.php ---------------------------------------------------------------------------------------------------------------------------------------------- FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES ---------------------------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase. 35 | WARNING | [ ] Line exceeds 80 characters; contains 123 characters 69 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 331 | ERROR | [ ] The array declaration extends to column 139 (the limit is 120). The array content should be split up over multiple lines 332 | ERROR | [ ] The array declaration extends to column 141 (the limit is 120). The array content should be split up over multiple lines ---------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPStatus.php ------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase. ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPManagedLink.php ------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase. 51 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LatestActivity.php -------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityBase. 194 | ERROR | [ ] Missing parameter type -------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPModuleAvailability.php ----------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------------- 42 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 74 | ERROR | [x] Use null coalesce operator instead of ternary operator. ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Entity/LPStatusViewsData.php ----------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES ----------------------------------------------------------------------------------------------------------------------------------------- 19 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 20 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 21 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 22 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead ----------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/LearningPathMembers/MembersPlugin.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AND 8 WARNINGS AFFECTING 9 LINES ------------------------------------------------------------------------------------------------------------------------------------------ 16 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 24 | ERROR | Unnecessarily gendered language in a comment 36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 56 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 64 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 71 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 89 | 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 104 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead ------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/LearningPathMembers/RecipientsPlugin.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 33 | 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 41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 48 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 61 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 113 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead --------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/views/field/OpignoLearningPathProgress.php ----------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------- 32 | WARNING | Unused variable $uid. ----------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/views/filter/OpignoGroupMembershipStatus.php ------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------- 24 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead ------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/views/filter/OpignoGroupMembershipBoolean.php -------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------------------------------- 17 | ERROR | Class property $no_operator should use lowerCamel naming without underscores 17 | ERROR | Missing member variable doc comment -------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Plugin/Block/StepsBlock.php ------------------------------------------------------------------------------------------------------------------------- FOUND 27 ERRORS AND 1 WARNING AFFECTING 27 LINES ------------------------------------------------------------------------------------------------------------------------- 16 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\Cache. 32 | ERROR | [ ] Missing short description in doc comment 37 | ERROR | [ ] Missing short description in doc comment 42 | ERROR | [ ] Missing short description in doc comment 47 | ERROR | [ ] Missing short description in doc comment 52 | ERROR | [ ] Missing short description in doc comment 60 | ERROR | [ ] Missing parameter comment 61 | ERROR | [ ] Missing parameter comment 62 | ERROR | [ ] Missing parameter comment 63 | ERROR | [ ] Missing parameter comment 64 | ERROR | [ ] Missing parameter comment 65 | ERROR | [ ] Missing parameter comment 66 | ERROR | [ ] Missing parameter comment 67 | ERROR | [ ] Missing parameter comment 77 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 87 | ERROR | [ ] Missing short description in doc comment 88 | ERROR | [ ] Missing parameter comment 89 | ERROR | [ ] Missing parameter comment 90 | ERROR | [ ] Missing parameter comment 91 | ERROR | [ ] Missing parameter comment 93 | ERROR | [ ] Description for the @return value is missing 99 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 99 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line 285 | ERROR | [ ] Missing parameter comment 287 | ERROR | [ ] Description for the @return value is missing 314 | ERROR | [ ] Missing parameter comment 316 | ERROR | [ ] Description for the @return value is missing 319 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathManagerController.php ---------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 8 LINES ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException. 26 | ERROR | [ ] Class property $content_types_manager should use lowerCamel naming without underscores 26 | ERROR | [ ] Missing member variable doc comment 48 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 70 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 325 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 348 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 536 | ERROR | [ ] Missing short description in doc comment 542 | ERROR | [ ] Missing short description in doc comment ---------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathController.php ----------------------------------------------------------------------------------------------------------------------------------- FOUND 3 ERRORS AND 10 WARNINGS AFFECTING 13 LINES ----------------------------------------------------------------------------------------------------------------------------------- 17 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 23 | ERROR | Protected method name "LearningPathController::build_step_score_cell" is not in lowerCamel format 59 | ERROR | Protected method name "LearningPathController::build_step_state_cell" is not in lowerCamel format 88 | ERROR | Protected method name "LearningPathController::build_course_row" is not in lowerCamel format 110 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 111 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 157 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 167 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 187 | WARNING | Variable $start_date inside unset call is undefined. 188 | WARNING | Variable $end_date inside unset call is undefined. 205 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 316 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 449 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ----------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathContentController.php -------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AND 12 WARNINGS AFFECTING 15 LINES -------------------------------------------------------------------------------------------------------------------------------------------------- 20 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Symfony\Component\HttpFoundation\Request. 33 | ERROR | [ ] Class property $content_types_manager should use lowerCamel naming without underscores 33 | ERROR | [ ] Missing member variable doc comment 34 | ERROR | [ ] Missing member variable doc comment 72 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 99 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 128 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 138 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 138 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 141 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 330 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 510 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 551 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 552 | WARNING | [ ] Unused variable $merge_query. 575 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 588 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 614 | ERROR | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option. -------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathResults.php -------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------------------------------------------------------- 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 48 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 71 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead -------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathStepsController.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 15 ERRORS AND 17 WARNINGS AFFECTING 31 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 20 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\opigno_learning_path\LearningPathContent. 27 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name 30 | ERROR | [ ] Class property $content_type_manager should use lowerCamel naming without underscores 30 | ERROR | [ ] Missing member variable doc comment 44 | ERROR | [ ] Class property $source_type should use lowerCamel naming without underscores 58 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 77 | ERROR | [ ] Missing parameter comment 78 | ERROR | [ ] Missing parameter comment 96 | ERROR | [ ] Missing parameter comment 97 | ERROR | [ ] Missing parameter comment 98 | ERROR | [ ] Missing parameter comment 100 | ERROR | [ ] Description for the @return value is missing 151 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 158 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 171 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 276 | ERROR | [x] Use null coalesce operator instead of ternary operator. 389 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 431 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters 433 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 434 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 595 | ERROR | [x] Use null coalesce operator instead of ternary operator. 622 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 628 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 631 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 636 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 690 | ERROR | [ ] Missing parameter comment 692 | ERROR | [ ] Description for the @return value is missing 696 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 699 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 732 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 810 | WARNING | [ ] Only string literals should be passed to t() where possible 817 | WARNING | [ ] Only string literals should be passed to t() where possible --------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathProgress.php ------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 3 ERRORS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface. 54 | ERROR | [ ] Parameter comment must start with a capital letter 59 | ERROR | [ ] Public method name "LearningPathProgress::getHTML" is not in lowerCamel format ------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathAchievementController.php ----------------------------------------------------------------------------------------------------------------------------------------------- FOUND 28 ERRORS AND 39 WARNINGS AFFECTING 67 LINES ----------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Ajax\AjaxResponse. 25 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name 68 | ERROR | [ ] Protected method name "LearningPathAchievementController::get_activity_max_score" is not in lowerCamel format 69 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 107 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_step_name" is not in lowerCamel format 141 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_step_score" is not in lowerCamel format 184 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_step_state" is not in lowerCamel format 189 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 191 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 193 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 195 | ERROR | [x] Use null coalesce operator instead of ternary operator. 215 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_module_panel" is not in lowerCamel format 217 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 219 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 224 | ERROR | [x] Use null coalesce operator instead of ternary operator. 241 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 366 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 380 | ERROR | [ ] No key specified for array entry; first entry specifies key 384 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 393 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 401 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 411 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 431 | ERROR | [ ] Parameter $latest_cert_date is not described in comment 442 | ERROR | [ ] Protected method name "LearningPathAchievementController::module_approved_activities" is not in lowerCamel format 447 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 461 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 493 | WARNING | [ ] Unused variable $score. 503 | WARNING | [ ] Unused variable $score. 512 | WARNING | [ ] Unused variable $score. 513 | WARNING | [ ] Unused variable $max_score. 541 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_course_steps" is not in lowerCamel format 544 | WARNING | [ ] Unused bound variable $user. 589 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 590 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 591 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 592 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 596 | ERROR | [ ] No key specified for array entry; first entry specifies key 600 | ERROR | [ ] Parameter $latest_cert_date is not described in comment 611 | ERROR | [ ] Protected method name "LearningPathAchievementController::course_steps_passed" is not in lowerCamel format 638 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_lp_steps" is not in lowerCamel format 665 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 675 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 693 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 698 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 702 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 706 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 716 | ERROR | [ ] No key specified for array entry; first entry specifies key 725 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 752 | WARNING | [ ] Unused variable $score_percent. 757 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 768 | ERROR | [ ] No key specified for array entry; first entry specifies key 770 | ERROR | [x] Use null coalesce operator instead of ternary operator. 798 | ERROR | [ ] No key specified for array entry; first entry specifies key 820 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_training_timeline" is not in lowerCamel format 822 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 851 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 861 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 941 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_training_summary" is not in lowerCamel format 962 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_training" is not in lowerCamel format 969 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 970 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 993 | ERROR | [ ] Public method name "LearningPathAchievementController::course_module_panel_ajax" is not in lowerCamel format 1016 | ERROR | [ ] Public method name "LearningPathAchievementController::training_module_panel_ajax" is not in lowerCamel format 1036 | ERROR | [ ] Public method name "LearningPathAchievementController::training_steps_ajax" is not in lowerCamel format 1054 | ERROR | [ ] Protected method name "LearningPathAchievementController::build_page" is not in lowerCamel format 1130 | ERROR | [ ] Public method name "LearningPathAchievementController::page_ajax" is not in lowerCamel format 1160 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead ----------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/Controller/LearningPathMembershipController.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 32 WARNINGS AFFECTING 33 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 43 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 107 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 111 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 123 | WARNING | [ ] User::loadMultiple calls should be avoided in classes, use dependency injection instead 145 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 154 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 195 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 199 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 210 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 218 | WARNING | [ ] User::loadMultiple calls should be avoided in classes, use dependency injection instead 245 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 250 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 254 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 267 | WARNING | [ ] User::loadMultiple calls should be avoided in classes, use dependency injection instead 316 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 321 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 411 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 416 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 417 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 438 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 440 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 448 | WARNING | [ ] Unused variable $account. 473 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 474 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 476 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 516 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 519 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 520 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 533 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 554 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 562 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 574 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 589 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathAccess.php ------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES ------------------------------------------------------------------------------------------------------------------------------------------------- 14 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\opigno_learning_path\Entity\LPManagedContent. 21 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name 148 | WARNING | [ ] Code after the RETURN statement on line 146 cannot be executed 153 | WARNING | [ ] Code after the RETURN statement on line 151 cannot be executed 644 | ERROR | [ ] Parameter tags must be grouped together in a doc comment 647 | ERROR | [ ] Parameter tags must be grouped together in a doc comment ------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathContentTypesManager.php --------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface. --------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/TwigExtension/DefaultTwigExtension.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AND 30 WARNINGS AFFECTING 31 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 97 | ERROR | Public method name "DefaultTwigExtension::is_group_member" is not in lowerCamel format 99 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 107 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 126 | ERROR | Public method name "DefaultTwigExtension::get_join_group_link" is not in lowerCamel format 127 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 134 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 143 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 158 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 161 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 167 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 193 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 221 | ERROR | Public method name "DefaultTwigExtension::get_start_link" is not in lowerCamel format 223 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 235 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 237 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 250 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 259 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 263 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 263 | WARNING | Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders 267 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 275 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 275 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 278 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 288 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 293 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 302 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 302 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 307 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 307 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 334 | ERROR | Public method name "DefaultTwigExtension::get_progress" is not in lowerCamel format 335 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 336 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 338 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 349 | ERROR | Public method name "DefaultTwigExtension::get_training_content" is not in lowerCamel format --------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LpSteps.php --------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES --------------------------------------------------------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ModuleHandler. 73 | WARNING | [ ] User::load calls should be avoided in classes, use dependency injection instead 272 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 366 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 516 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathGroupOperationsLinks.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: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/LearningPathMembersManager.php ------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface. 32 | WARNING | [ ] Possible useless method overriding detected ------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/opigno_learning_path/src/EventSubscriber/LearningPathEventSubscriber.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 3 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 18 | ERROR | Class property $content_types_manager should use lowerCamel naming without underscores 18 | ERROR | Missing member variable doc comment 67 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------------------------------- Time: 5.44 secs; Memory: 34MB ➜ contrib
Thank you.