Problem/Motivation

Some coding standards checks are failing and there are some elements that could be moved to the main service.

Coding standards report:

FILE: /.../maintenance_notify/maintenance_notify.module
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 63 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------


FILE: /.../maintenance_notify/README.md
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------
 10 | WARNING | Line exceeds 80 characters; contains 92 characters
 12 | WARNING | Line exceeds 80 characters; contains 101 characters
 15 | WARNING | Line exceeds 80 characters; contains 112 characters
 19 | WARNING | Line exceeds 80 characters; contains 111 characters
 28 | WARNING | Line exceeds 80 characters; contains 81 characters
 36 | WARNING | Line exceeds 80 characters; contains 101 characters
 37 | WARNING | Line exceeds 80 characters; contains 94 characters
-------------------------------------------------------------------------

Time: 125ms; Memory: 10MB

Also see the use of the t function inside the form, which can be changed to $this->t.

Lastly, the logic inside the ".module" function used for cron and form_alter could be extracted to the service.

Proposed resolution

Fix the coding standards as well as refactor some parts on some files.

CommentFileSizeAuthor
#2 maintenance_notify.patch8.88 KBfjgarlin

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Status: Active » Needs review
StatusFileSize
new8.88 KB

Patch supplied

dspachos’s picture

Nice! Thanks very much @ fjgarlin

dspachos’s picture

Status: Needs review » Fixed
dspachos’s picture

dspachos’s picture

Status: Fixed » Closed (fixed)