Problem/Motivation

Coding Standard
htmlmail/src/Plugin/Mail/HtmlMailSystem.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
81 | ERROR | [ ] Missing member variable doc comment
82 | ERROR | [ ] Missing member variable doc comment
83 | ERROR | [ ] Missing member variable doc comment
293 | ERROR | [x] list(...) is forbidden, use [...] instead.
332 | ERROR | [x] list(...) is forbidden, use [...] instead.
472 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------
htmlmail/src/Helper/HtmlMailHelper.php
--------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
73 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------
htmlmail/src/Utility/HtmlMailMime.php
--------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------
573 | ERROR | [x] Use null coalesce operator instead of ternary operator.
581 | ERROR | [x] Use null coalesce operator instead of ternary operator.
583 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------

Steps to reproduce

vendor/bin/phpcs --standard="Drupal,DrupalPractice" -n --extensions="php,module,inc,install,test,profile,theme" htmlmail/

Data model changes

CommentFileSizeAuthor
#2 CodingStandardIssue-3356198-2.patch4.49 KBnishant

Comments

Nishant created an issue. See original summary.

nishant’s picture

StatusFileSize
new4.49 KB

Created patch for the above coding standard issue.

nishant’s picture

Status: Needs work » Needs review
tr’s picture

Category: Bug report » Task
Status: Needs review » Closed (won't fix)

? Your patch is for the Captcha module, not the HTML Mail module.

diff --git a/captcha.install b/captcha.install
index 0a9b263..65130f4 100755
--- a/captcha.install
+++ b/captcha.install

Regardless, coding standards are the least of the problems with this module. Please read and contribute to #3339287: The future of the HTML Mail module if you need the functionality provided by the HTML Mail module.