Problem/Motivation
FILE: modules/encrypt_seclib/src/Plugin/EncryptionMethod/PHPSecLibEncryption.php
---------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
19 | WARNING | [ ] Line exceeds 80 characters; contains 158 characters
22 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
35 | ERROR | [ ] Missing short description in doc comment
36 | ERROR | [ ] Description for the @return value is missing
45 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [ ] Description for the @return value is missing
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: modules/encrypt_seclib/src/Tests/PHPSecLibEncryptTest.php
--------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 5 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
26 | WARNING | [x] '@TODO: remove if
https://www.drupal.org/node/2666196 →
is fixed.' should match the format '@todo Fix problem X here.'
27 | ERROR | [x] You must use "/**" style comments for a member variable comment
27 | ERROR | [ ] Do not disable strict config schema checking in tests. Instead ensure your module properly declares its schema for configurations.
34 | ERROR | [x] Short array syntax must be used to define arrays
81 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
90 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
91 | 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
--------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: modules/encrypt_seclib/encrypt_seclib.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | "core_version_requirement" property is missing in the info.yml file
6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-----------------------------------------------------------------------------------------------------------
Time: 134ms; Memory: 10MB
Steps to reproduce
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig "module_name"
Proposed resolution
Resolve the PHPCS issues.