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.
Comments
Comment #2
fjgarlin commentedPatch supplied
Comment #3
dspachos commentedNice! Thanks very much @ fjgarlin
Comment #4
dspachos commentedComment #5
dspachos commentedComment #6
dspachos commented