Problem/Motivation
Getting following error/warnings
FILE: /var/www/html/modules/contrib/domain_access_search_api/domain_access_search_api.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
21 | ERROR | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
25 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/domain_access_search_api/domain_access_search_api.info.yml
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/domain_access_search_api/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 90 characters
4 | WARNING | Line exceeds 80 characters; contains 90 characters
9 | WARNING | Line exceeds 80 characters; contains 92 characters
10 | WARNING | Line exceeds 80 characters; contains 91 characters
----------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/domain_access_search_api/src/Plugin/views/filter/DomainAccessSearchApiCurrentAllFilter.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
24 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
47 | ERROR | [x] Data types in @var tags need to be fully namespaced
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
Time: 2.05 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/domain_access_search_api/
Proposed resolution
Above error/warnings need to be fixed.