Problem/Motivation
There are so many Phpcs issue found even after PHPCBF command run.
These are the errors found
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/README.md
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
---------------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 406 characters
8 | WARNING | Line exceeds 80 characters; contains 89 characters
12 | WARNING | Line exceeds 80 characters; contains 222 characters
19 | WARNING | Line exceeds 80 characters; contains 143 characters
20 | WARNING | Line exceeds 80 characters; contains 111 characters
21 | WARNING | Line exceeds 80 characters; contains 159 characters
23 | WARNING | Line exceeds 80 characters; contains 252 characters
24 | WARNING | Line exceeds 80 characters; contains 192 characters
25 | WARNING | Line exceeds 80 characters; contains 139 characters
35 | WARNING | Line exceeds 80 characters; contains 88 characters
---------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/webt.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/webt.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 3 WARNINGS AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
7 | WARNING | Global constants should not be used, move it to a class or interface
19 | ERROR | Description for the @return value is missing
31 | ERROR | Description for the @return value is missing
43 | ERROR | Description for the @return value is missing
58 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
63 | ERROR | Description for the @return value is missing
65 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "mark_entity_for_translation" but expected "webt_mark_entity_for_translation"
73 | WARNING | Line exceeds 80 characters; contains 97 characters
80 | ERROR | Description for the @return value is missing
86 | WARNING | Line exceeds 80 characters; contains 89 characters
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/translation_engines/AbstractTranslationService.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 45 ERRORS AND 18 WARNINGS AFFECTING 63 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
17 | WARNING | Line exceeds 80 characters; contains 81 characters
21 | ERROR | Class property $drupal_variable_patterns should use lowerCamel naming without underscores
39 | ERROR | Class property $html_wrapper_prefix should use lowerCamel naming without underscores
45 | ERROR | Class property $html_wrapper_suffix should use lowerCamel naming without underscores
47 | WARNING | Line exceeds 80 characters; contains 90 characters
51 | ERROR | Class property $special_char_dict should use lowerCamel naming without underscores
57 | ERROR | Class property $translatable_html_attributes should use lowerCamel naming without underscores
64 | ERROR | Class property $http_client should use lowerCamel naming without underscores
70 | ERROR | Class property $retry_on_entity_translation_error should use lowerCamel naming without underscores
72 | WARNING | Line exceeds 80 characters; contains 90 characters
76 | ERROR | Class property $max_chars_per_request should use lowerCamel naming without underscores
107 | ERROR | Description for the @return value is missing
109 | ERROR | Protected method name "AbstractTranslationService::send_translation_request" is not in lowerCamel format
114 | ERROR | Description for the @return value is missing
116 | ERROR | Protected method name "AbstractTranslationService::send_language_direction_request" is not in lowerCamel format
121 | ERROR | Description for the @return value is missing
123 | ERROR | Public method name "AbstractTranslationService::is_authorized" is not in lowerCamel format
126 | WARNING | Line exceeds 80 characters; contains 97 characters
128 | ERROR | Description for the @return value is missing
130 | ERROR | Public method name "AbstractTranslationService::get_supported_languages" is not in lowerCamel format
158 | ERROR | Description for the @return value is missing
160 | ERROR | Public method name "AbstractTranslationService::is_language_supported" is not in lowerCamel format
187 | ERROR | Description for the @return value is missing
222 | WARNING | Line exceeds 80 characters; contains 179 characters
244 | WARNING | Line exceeds 80 characters; contains 89 characters
291 | WARNING | Line exceeds 80 characters; contains 89 characters
293 | ERROR | Description for the @return value is missing
295 | ERROR | Public method name "AbstractTranslationService::test_connection" is not in lowerCamel format
315 | ERROR | Description for the @return value is missing
317 | ERROR | Protected method name "AbstractTranslationService::map_language_direction_response_body" is not in lowerCamel format
327 | ERROR | Description for the @return value is missing
329 | ERROR | Protected method name "AbstractTranslationService::translatable_values_to_xml" is not in lowerCamel format
341 | WARNING | Line exceeds 80 characters; contains 111 characters
356 | WARNING | Line exceeds 80 characters; contains 115 characters
379 | ERROR | Description for the @return value is missing
381 | ERROR | Public method name "AbstractTranslationService::decode_xml_translations" is not in lowerCamel format
401 | WARNING | Line exceeds 80 characters; contains 89 characters
422 | ERROR | Description for the @return value is missing
424 | ERROR | Private method name "AbstractTranslationService::process_attribute_nodes" is not in lowerCamel format
425 | WARNING | Line exceeds 80 characters; contains 82 characters
429 | WARNING | Line exceeds 80 characters; contains 91 characters
440 | WARNING | Line exceeds 80 characters; contains 117 characters
447 | ERROR | Description for the @return value is missing
449 | ERROR | Private method name "AbstractTranslationService::replace_text_nodes_bottom_up" is not in lowerCamel format
454 | WARNING | Line exceeds 80 characters; contains 118 characters
463 | WARNING | Line exceeds 80 characters; contains 86 characters
492 | ERROR | Description for the @return value is missing
494 | ERROR | Private method name "AbstractTranslationService::encode_placeholders" is not in lowerCamel format
522 | ERROR | Description for the @return value is missing
524 | ERROR | Private method name "AbstractTranslationService::decode_placeholders" is not in lowerCamel format
530 | WARNING | Line exceeds 80 characters; contains 85 characters
539 | ERROR | Description for the @return value is missing
541 | ERROR | Private method name "AbstractTranslationService::restore_spaces_around_placeholders" is not in lowerCamel format
571 | ERROR | Description for the @return value is missing
573 | ERROR | Protected method name "AbstractTranslationService::get_placeholder" is not in lowerCamel format
583 | ERROR | Description for the @return value is missing
585 | ERROR | Private method name "AbstractTranslationService::wrap_as_html" is not in lowerCamel format
590 | WARNING | Line exceeds 80 characters; contains 84 characters
603 | ERROR | Description for the @return value is missing
605 | ERROR | Private method name "AbstractTranslationService::update_progress_info" is not in lowerCamel format
615 | WARNING | Line exceeds 80 characters; contains 86 characters
622 | ERROR | Description for the @return value is missing
624 | ERROR | Private method name "AbstractTranslationService::check_client_disconnected" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/translation_engines/generic/GenericMTService.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 6 WARNINGS AFFECTING 13 LINES
---------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | Line exceeds 80 characters; contains 90 characters
22 | ERROR | Class property $default_chars_per_request should use lowerCamel naming without underscores
47 | ERROR | Description for the @return value is missing
49 | ERROR | Protected method name "GenericMTService::send_translation_request" is not in lowerCamel format
92 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
96 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
104 | ERROR | Description for the @return value is missing
106 | ERROR | Protected method name "GenericMTService::send_language_direction_request" is not in lowerCamel format
126 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
130 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
138 | ERROR | Description for the @return value is missing
140 | ERROR | Public method name "GenericMTService::is_authorized" is not in lowerCamel format
144 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/translation_engines/etranslation/EtranslationService.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 28 ERRORS AND 16 WARNINGS AFFECTING 44 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | Line exceeds 80 characters; contains 90 characters
22 | ERROR | Class property $default_chars_per_request should use lowerCamel naming without underscores
29 | ERROR | Class property $error_map should use lowerCamel naming without underscores
99 | ERROR | Class property $api_url should use lowerCamel naming without underscores
102 | WARNING | Line exceeds 80 characters; contains 115 characters
106 | ERROR | Class property $retry_on_entity_translation_error should use lowerCamel naming without underscores
113 | ERROR | Class property $request_timeout should use lowerCamel naming without underscores
119 | ERROR | Class property $etranslation_timeout should use lowerCamel naming without underscores
126 | ERROR | Class property $segment_opening should use lowerCamel naming without underscores
132 | ERROR | Class property $segment_closing should use lowerCamel naming without underscores
148 | ERROR | The array declaration extends to column 125 (the limit is 80). The array content should be split up over multiple lines
166 | ERROR | Description for the @return value is missing
168 | ERROR | Protected method name "EtranslationService::send_translation_request" is not in lowerCamel format
192 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
204 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
208 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
225 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
229 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
240 | ERROR | Description for the @return value is missing
242 | ERROR | Public method name "EtranslationService::etranslation_response_to_translation_array" is not in lowerCamel format
268 | ERROR | Description for the @return value is missing
270 | ERROR | Private method name "EtranslationService::get_post_body" is not in lowerCamel format
271 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
311 | ERROR | Description for the @return value is missing
313 | ERROR | Private method name "EtranslationService::await_etranslation_response" is not in lowerCamel format
322 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
326 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
327 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
331 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
342 | ERROR | Description for the @return value is missing
344 | ERROR | Protected method name "EtranslationService::send_language_direction_request" is not in lowerCamel format
358 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
362 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
370 | ERROR | Description for the @return value is missing
372 | ERROR | Public method name "EtranslationService::is_authorized" is not in lowerCamel format
374 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
381 | WARNING | Line exceeds 80 characters; contains 92 characters
386 | ERROR | Description for the @return value is missing
388 | ERROR | Protected method name "EtranslationService::map_language_direction_response_body" is not in lowerCamel format
412 | ERROR | Description for the @return value is missing
414 | ERROR | Private method name "EtranslationService::get_application_name" is not in lowerCamel format
419 | WARNING | Line exceeds 80 characters; contains 84 characters
421 | ERROR | Description for the @return value must be on the next line
423 | ERROR | Private method name "EtranslationService::get_password" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/translation_engines/etranslation/EtranslationUtils.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 92 characters
15 | ERROR | Class property $timeout_value should use lowerCamel naming without underscores
21 | ERROR | Class property $error_value should use lowerCamel naming without underscores
27 | ERROR | Class property $etranslation_timeout_default should use lowerCamel naming without underscores
35 | ERROR | Description for the @return value is missing
37 | ERROR | Public method name "EtranslationUtils::encrypt_password" is not in lowerCamel format
55 | ERROR | Description for the @return value is missing
57 | ERROR | Public method name "EtranslationUtils::decrypt_password" is not in lowerCamel format
79 | ERROR | Description for the @return value is missing
81 | ERROR | Public method name "EtranslationUtils::get_cache_key" is not in lowerCamel format
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Form/TranslationProviderForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 29 WARNINGS AFFECTING 33 LINES
------------------------------------------------------------------------------------------------------------------------------------------
24 | ERROR | Class property $etranslation_engine_id should use lowerCamel naming without underscores
30 | ERROR | Class property $generic_mt_engine_id should use lowerCamel naming without underscores
35 | ERROR | Description for the @return value is missing
49 | ERROR | Description for the @return value is missing
117 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
154 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
259 | WARNING | Line exceeds 80 characters; contains 104 characters
266 | ERROR | Description for the @return value is missing
269 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
270 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
288 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
288 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
293 | WARNING | Line exceeds 80 characters; contains 132 characters
300 | ERROR | Description for the @return value is missing
317 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
323 | WARNING | Line exceeds 80 characters; contains 104 characters
330 | ERROR | Description for the @return value is missing
333 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
334 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
345 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
351 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
351 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
355 | WARNING | Line exceeds 80 characters; contains 96 characters
357 | ERROR | Description for the @return value is missing
377 | ERROR | Description for the @return value is missing
380 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
384 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
384 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
389 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
389 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
395 | WARNING | Line exceeds 80 characters; contains 134 characters
397 | ERROR | Description for the @return value is missing
401 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
406 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
415 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
434 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
434 | WARNING | Only string literals should be passed to t() where possible
439 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
439 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Form/PretranslationForm.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AND 83 WARNINGS AFFECTING 86 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
22 | ERROR | Description for the @return value is missing
36 | ERROR | Description for the @return value is missing
54 | 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
59 | WARNING | Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders
59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
66 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
79 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
110 | ERROR | Description for the @return value is missing
115 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
122 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
127 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
129 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
134 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
136 | 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
143 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
148 | 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
155 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
157 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
165 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
166 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
170 | WARNING | Line exceeds 80 characters; contains 90 characters
171 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
179 | WARNING | Line exceeds 80 characters; contains 86 characters
186 | ERROR | Description for the @return value is missing
189 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
190 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
197 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
197 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
201 | WARNING | Line exceeds 80 characters; contains 81 characters
202 | WARNING | Line exceeds 80 characters; contains 106 characters
202 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
209 | ERROR | Description for the @return value is missing
212 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
219 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
220 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
220 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
220 | WARNING | Only string literals should be passed to t() where possible
235 | ERROR | Description for the @return value is missing
239 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
251 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
251 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
273 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
285 | ERROR | Description for the @return value is missing
288 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
290 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
294 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
305 | ERROR | Description for the @return value is missing
308 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
309 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
330 | ERROR | Description for the @return value is missing
333 | 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
359 | ERROR | Description for the @return value is missing
362 | 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
366 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
380 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
385 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
399 | ERROR | Description for the @return value is missing
402 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
404 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
408 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
416 | ERROR | Description for the @return value is missing
420 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
421 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
434 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
434 | WARNING | Only string literals should be passed to t() where possible
454 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
470 | ERROR | Description for the @return value is missing
472 | ERROR | Public method name "PretranslationForm::register_translation_results" is not in lowerCamel format
475 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
475 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
475 | WARNING | Only string literals should be passed to t() where possible
480 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
480 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
480 | WARNING | Only string literals should be passed to t() where possible
485 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
485 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
485 | WARNING | Only string literals should be passed to t() where possible
492 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
505 | ERROR | Description for the @return value is missing
507 | ERROR | Public method name "PretranslationForm::register_deletion_results" is not in lowerCamel format
510 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
510 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
510 | WARNING | Only string literals should be passed to t() where possible
514 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
525 | ERROR | Description for the @return value is missing
527 | ERROR | Private method name "PretranslationForm::is_string_type_selected" is not in lowerCamel format
534 | WARNING | Line exceeds 80 characters; contains 99 characters
539 | ERROR | Description for the @return value is missing
541 | ERROR | Private method name "PretranslationForm::filter_supported_languages" is not in lowerCamel format
543 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
546 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
549 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
549 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
549 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
549 | WARNING | Only string literals should be passed to t() where possible
561 | ERROR | Description for the @return value is missing
563 | ERROR | Private method name "PretranslationForm::validate_pretranslation_request" is not in lowerCamel format
564 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
567 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
567 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/TranslationManager.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 40 ERRORS AND 24 WARNINGS AFFECTING 64 LINES
--------------------------------------------------------------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 107 characters
20 | ERROR | Class property $translation_service should use lowerCamel naming without underscores
27 | ERROR | Class property $config_factory should use lowerCamel naming without underscores
37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
41 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
54 | WARNING | Line exceeds 80 characters; contains 114 characters
56 | ERROR | Description for the @return value must be on the next line
58 | ERROR | Public method name "TranslationManager::translate_entities" is not in lowerCamel format
127 | ERROR | Description for the @return value is missing
129 | ERROR | Public method name "TranslationManager::entity_update_all_translations" is not in lowerCamel format
130 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
132 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
144 | WARNING | Line exceeds 80 characters; contains 82 characters
153 | WARNING | Line exceeds 80 characters; contains 86 characters
155 | ERROR | Description for the @return value is missing
157 | ERROR | Public method name "TranslationManager::translate_entity" is not in lowerCamel format
158 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
183 | ERROR | Description for the @return value must be on the next line
185 | ERROR | Public method name "TranslationManager::delete_translations_of_entities" is not in lowerCamel format
211 | ERROR | Description for the @return value must be on the next line
213 | ERROR | Public method name "TranslationManager::translate_ui_strings" is not in lowerCamel format
214 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
246 | ERROR | Description for the @return value is missing
248 | ERROR | Public method name "TranslationManager::get_untranslated_ui_strings" is not in lowerCamel format
249 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
269 | ERROR | Description for the @return value must be on the next line
271 | ERROR | Public method name "TranslationManager::delete_ui_translations" is not in lowerCamel format
273 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
292 | ERROR | Description for the @return value must be on the next line
294 | ERROR | Public method name "TranslationManager::translate_config_strings" is not in lowerCamel format
316 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
342 | ERROR | Description for the @return value is missing
344 | ERROR | Public method name "TranslationManager::get_untranslated_config_strings" is not in lowerCamel format
346 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
363 | ERROR | Description for the @return value is missing
365 | ERROR | Private method name "TranslationManager::get_translatable_config_strings" is not in lowerCamel format
385 | WARNING | Line exceeds 80 characters; contains 84 characters
390 | ERROR | Description for the @return value is missing
392 | ERROR | Private method name "TranslationManager::get_translatable_config_fields" is not in lowerCamel format
403 | WARNING | Line exceeds 80 characters; contains 131 characters
429 | ERROR | Description for the @return value must be on the next line
431 | ERROR | Public method name "TranslationManager::delete_config_translations" is not in lowerCamel format
438 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
449 | ERROR | Description for the @return value is missing
451 | ERROR | Public method name "TranslationManager::get_translatable_fields" is not in lowerCamel format
476 | WARNING | Line exceeds 80 characters; contains 90 characters
481 | ERROR | Description for the @return value is missing
483 | ERROR | Public method name "TranslationManager::entity_translatable_content_changed" is not in lowerCamel format
506 | WARNING | Line exceeds 80 characters; contains 83 characters
513 | ERROR | Description for the @return value is missing
515 | ERROR | Public method name "TranslationManager::get_translation_progress_percents" is not in lowerCamel format
524 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
540 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
559 | ERROR | Description for the @return value is missing
561 | ERROR | Public method name "TranslationManager::get_default_language_code" is not in lowerCamel format
562 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
577 | ERROR | Description for the @return value is missing
579 | ERROR | Private method name "TranslationManager::entity_create_translation" is not in lowerCamel format
641 | WARNING | Line exceeds 80 characters; contains 83 characters
648 | ERROR | Description for the @return value must be on the next line
650 | ERROR | Private method name "TranslationManager::get_processing_response" is not in lowerCamel format
666 | WARNING | Line exceeds 80 characters; contains 82 characters
673 | ERROR | Description for the @return value is missing
675 | ERROR | Public method name "TranslationManager::extract_translatable_values" is not in lowerCamel format
--------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Plugin/Block/MtNoticeBlock.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | Doc comment is empty
26 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
27 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/AssetManager.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
18 | ERROR | Description for the @return value is missing
21 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Controller/AboutTabController.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 7 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
16 | ERROR | Description for the @return value is missing
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
23 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
29 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
30 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
31 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Controller/PretranslationProgressController.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------------------------------------
19 | ERROR | Class property $progress_key should use lowerCamel naming without underscores
24 | ERROR | Description for the @return value is missing
44 | ERROR | Description for the @return value is missing
55 | ERROR | Description for the @return value is missing
59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
59 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
69 | ERROR | Description for the @return value is missing
81 | ERROR | Description for the @return value is missing
90 | ERROR | Description for the @return value is missing
99 | ERROR | Description for the @return value is missing
115 | ERROR | Description for the @return value is missing
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Controller/EtranslationCallbackController.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 3 WARNINGS AFFECTING 12 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16 | WARNING | Line exceeds 80 characters; contains 112 characters
16 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
18 | ERROR | Description for the @return value is missing
21 | ERROR | The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('request-id') instead
27 | ERROR | The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('external-reference') instead
31 | ERROR | The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('target-language') instead
42 | WARNING | Line exceeds 80 characters; contains 109 characters
44 | ERROR | Description for the @return value is missing
47 | ERROR | The $_REQUEST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('request-id') instead
63 | ERROR | Description for the @return value is missing
86 | ERROR | Description for the @return value must be on the next line
104 | WARNING | Line exceeds 80 characters; contains 95 characters
109 | ERROR | Description for the @return value must be on the next line
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Model/TranslationStatus.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 86 characters
------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Model/StringType.php
-----------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------
18 | ERROR | Description for the @return value is missing
20 | ERROR | Public method name "StringType::get_all_types" is not in lowerCamel format
31 | ERROR | Description for the @return value is missing
33 | ERROR | Public method name "StringType::get_display_name" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/webt/webt/src/Model/ProcessingResponse.php
-------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------
14 | ERROR | Class property $processing_error should use lowerCamel naming without underscores
20 | ERROR | Class property $partially_processed should use lowerCamel naming without underscores
26 | ERROR | Class property $fully_processed should use lowerCamel naming without underscores
32 | ERROR | Class property $already_processed should use lowerCamel naming without underscores
-------------------------------------------------------------------------------------------------------------------
Time: 879ms; Memory: 16MB
Steps to reproduce
Use below command after module clone
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/webt
Run PHPCBF command too to reduce the numbers or errors.
Proposed resolution
Fix all the issue found by PHPCS