Prechecker results: error


Overview

(0 errors, 0 warnings)

This section shows the general problems detected when processing the code [More info]


PHP lint problems

(0 errors, 0 warnings)

This section shows php lint problems in the code detected by php -l [More info]


PHP coding style problems

(55 errors, 125 warnings)

This section shows the coding style problems detected in the code by phpcs [More info]

local/sitenotice/classes/external.php
(#40) Short array syntax must be used to define arrays
(#54) Short array syntax must be used to define arrays
(#75) Short array syntax must be used to define arrays
(#89) Short array syntax must be used to define arrays
(#103) Short array syntax must be used to define arrays
(#124) Short array syntax must be used to define arrays
(#137) Short array syntax must be used to define arrays
(#150) Short array syntax must be used to define arrays
(#161) Short array syntax must be used to define arrays
(#205) Short array syntax must be used to define arrays
local/sitenotice/classes/form/active_filter_form.php
(#57) Short array syntax must be used to define arrays
local/sitenotice/classes/form/notice_form.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
(#39) Short array syntax must be used to define arrays
(#44) Expected 0 spaces after "definition"; 1 found
(#83) Short array syntax must be used to define arrays
(#108) Short array syntax must be used to define arrays
local/sitenotice/classes/helper.php
(#19) Import statements must not begin with a leading backslash
(#20) Import statements must not begin with a leading backslash
(#21) Import statements must not begin with a leading backslash
(#22) Import statements must not begin with a leading backslash
(#23) Import statements must not begin with a leading backslash
(#78) Short array syntax must be used to define arrays
(#109) Short array syntax must be used to define arrays
(#190) Short array syntax must be used to define arrays
(#215) Short array syntax must be used to define arrays
(#240) Short array syntax must be used to define arrays
(#266) Short array syntax must be used to define arrays
(#472) Short array syntax must be used to define arrays
(#479) Short array syntax must be used to define arrays
(#522) Short array syntax must be used to define arrays
(#555) Short array syntax must be used to define arrays
(#617) Short array syntax must be used to define arrays
(#678) There should be a comma after the last array item in a multi-line array.
local/sitenotice/classes/persistent/sitenotice.php
(#49) Short array syntax must be used to define arrays
(#51) There should be a comma after the last array item in a multi-line array.
(#76) There should be a comma after the last array item in a multi-line array.
(#81) There should be a comma after the last array item in a multi-line array.
local/sitenotice/classes/privacy/provider.php
(#55) There should be a comma after the last array item in a multi-line array.
local/sitenotice/classes/report_filter.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
(#50) Content missing for @var tag in member variable comment
local/sitenotice/classes/table/acknowledged_notice.php
(#99) Short array syntax must be used to define arrays
(#114) Short array syntax must be used to define arrays
(#173) Short array syntax must be used to define arrays
(#188) Short array syntax must be used to define arrays
local/sitenotice/classes/table/all_notices.php
(#66) Short array syntax must be used to define arrays
local/sitenotice/classes/table/dismissed_notice.php
(#89) Short array syntax must be used to define arrays
(#94) There should be a comma after the last array item in a multi-line array.
(#151) Short array syntax must be used to define arrays
(#167) Short array syntax must be used to define arrays
local/sitenotice/db/access.php
(#28) Short array syntax must be used to define arrays
(#30) Short array syntax must be used to define arrays
(#32) There should be a comma after the last array item in a multi-line array.
local/sitenotice/db/caches.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
(#31) There should be a comma after the last array item in a multi-line array.
(#34) There should be a comma after the last array item in a multi-line array.
(#35) There should be a comma after the last array item in a multi-line array.
local/sitenotice/db/services.php
(#26) Short array syntax must be used to define arrays
(#27) Short array syntax must be used to define arrays
(#37) Short array syntax must be used to define arrays
(#47) Short array syntax must be used to define arrays
(#57) Short array syntax must be used to define arrays
local/sitenotice/editnotice.php
(#45) Short array syntax must be used to define arrays
(#50) There should be a comma after the last array item in a multi-line array.
(#121) Short array syntax must be used to define arrays
local/sitenotice/lang/en/local_sitenotice.php
(#28) The string key "cachedef_enabled_notices" is not in the correct order, it should be before "pluginname"
(#31) Unexpected comment found. Auto-fixing will not work after this comment
(#33) The string key "setting:managenotice" is not in the correct order, it should be before "setting:settings"
(#34) The string key "setting:enabled" is not in the correct order, it should be before "setting:managenotice"
(#36) The string key "setting:allow_update" is not in the correct order, it should be before "setting:enableddesc"
(#38) The string key "setting:allow_delete" is not in the correct order, it should be before "setting:allow_updatedesc"
(#45) Unexpected comment found. Auto-fixing will not work after this comment
(#46) The string key "notice:title" is not in the correct order, it should be before "setting:cleanup_deleted_noticedesc"
(#47) The string key "notice:content" is not in the correct order, it should be before "notice:title"
(#48) The string key "notice:activefrom" is not in the correct order, it should be before "notice:content"
(#58) The string key "notice:forcelogout" is not in the correct order, it should be before "notice:reqack_help"
(#62) The string key "notice:disable" is not in the correct order, it should be before "notice:reqcourse_help"
(#63) The string key "notice:create" is not in the correct order, it should be before "notice:disable"
(#65) The string key "notice:info" is not in the correct order, it should be before "notice:view"
(#68) The string key "notice:delete" is not in the correct order, it should be before "notice:reset"
(#70) The string key "notice:hlinkcount" is not in the correct order, it should be before "notice:timemodified"
(#73) The string key "notice:redirectmsg" is not in the correct order, it should be before "notice:resetinterval_help"
(#74) The string key "notice:notice" is not in the correct order, it should be before "notice:redirectmsg"
(#78) Unexpected comment found. Auto-fixing will not work after this comment
(#81) Unexpected comment found. Auto-fixing will not work after this comment
(#82) The string key "event:dismiss" is not in the correct order, it should be before "sitenotice:manage"
(#83) The string key "event:acknowledge" is not in the correct order, it should be before "event:dismiss"
(#86) The string key "event:reset" is not in the correct order, it should be before "event:update"
(#87) The string key "event:enable" is not in the correct order, it should be before "event:reset"
(#88) The string key "event:disable" is not in the correct order, it should be before "event:enable"
(#89) The string key "event:delete" is not in the correct order, it should be before "event:disable"
(#92) Unexpected comment found. Auto-fixing will not work after this comment
(#94) The string key "booleanformat:true" is not in the correct order, it should be before "timeformat:resetinterval"
(#95) The string key "booleanformat:false" is not in the correct order, it should be before "booleanformat:true"
(#97) Unexpected comment found. Auto-fixing will not work after this comment
(#103) The string key "privacy:metadata:firstname" is not in the correct order, it should be before "privacy:metadata:username"
(#105) The string key "privacy:metadata:idnumber" is not in the correct order, it should be before "privacy:metadata:lastname"
(#107) Unexpected comment found. Auto-fixing will not work after this comment
(#108) The string key "notification:noack" is not in the correct order, it should be before "privacy:metadata:idnumber"
(#111) The string key "notification:nodeleteallowed" is not in the correct order, it should be before "notification:noticedoesnotexist"
(#114) Unexpected comment found. Auto-fixing will not work after this comment
(#115) The string key "confirmation:deletenotice" is not in the correct order, it should be before "notification:noupdateallowed"
(#117) Unexpected comment found. Auto-fixing will not work after this comment
(#118) The string key "button:close" is not in the correct order, it should be before "confirmation:deletenotice"
(#119) The string key "button:accept" is not in the correct order, it should be before "button:close"
(#121) Unexpected comment found. Auto-fixing will not work after this comment
(#126) The string key "report:acknowledged" is not in the correct order, it should be before "report:dismissed_desc"
(#127) The string key "report:acknowledge_desc" is not in the correct order, it should be before "report:acknowledged"
(#129) The string key "report:timecreated_server" is not in the correct order, it should be before "report:timeformat:sortable"
(#132) Unexpected comment found. Auto-fixing will not work after this comment
(#133) The string key "modal:checkboxtext" is not in the correct order, it should be before "report:timecreated_spreadsheet"
(#134) The string key "modal:acceptbtntooltip" is not in the correct order, it should be before "modal:checkboxtext"
local/sitenotice/lib.php
(#43) Short array syntax must be used to define arrays
local/sitenotice/renderer.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
local/sitenotice/report/acknowledged_report.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file acknowledged_report.php
local/sitenotice/report/dismissed_report.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file dismissed_report.php
(#60) Line exceeds 132 characters; contains 133 characters
local/sitenotice/tests/helper_test.php
(#30) Unit test helper_test should be declared as final.
(#35) Test method test_built_cohort_options() is missing a return type
(#54) Test method test_can_have_html_in_notice_content() is missing a return type
(#81) Test method test_format_interval_time() is missing a return type
(#92) Test method test_cohort_options() is missing a return type
local/sitenotice/tests/sitenotice_test.php
(#31) Unit test sitenotice_test should be declared as final.
(#36) The setUp() method in unit tests must always call to parent::setUp().
(#52) Test method test_create_notices() is missing a return type
(#91) Data provider should not end with "()". "generic_provider()" provided.
(#94) Test method test_reset_notices() is missing a return type
(#127) Data provider should not end with "()". "generic_provider()" provided.
(#130) Test method test_enable_notices() is missing a return type
(#167) Data provider should not end with "()". "generic_provider()" provided.
(#170) Test method test_user_notice() is missing a return type
(#242) Data provider should not end with "()". "generic_provider()" provided.
(#245) Test method test_user_hlink_interact() is missing a return type
(#278) Test method test_user_required_completion() is missing a return type
(#284) Line exceeds 132 characters; contains 153 characters
(#287) Short array syntax must be used to define arrays
(#295) Short array syntax must be used to define arrays
(#299) Short array syntax must be used to define arrays
(#300) Short array syntax must be used to define arrays
(#301) Short array syntax must be used to define arrays
(#302) Short array syntax must be used to define arrays
(#322) Short array syntax must be used to define arrays
(#336) Test method test_retrieve_user_notices_when_dismissed_one_that_requires_acknowledgement() is missing a return type
(#365) Test method test_retrieve_user_notices_when_dismiss_and_then_acknowledged() is missing a return type
(#404) Test method test_retrieve_user_notices_when_force_logout() is missing a return type
(#448) Data provider method "generic_provider" will need to be converted to static in future.
(#448) Data provider method "generic_provider" will need to be converted to static in future.
(#448) Data provider method "generic_provider" will need to be converted to static in future.
(#448) Data provider method "generic_provider" will need to be converted to static in future.
(#448) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#448) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#448) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#448) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#473) There should be a comma after the last array item in a multi-line array.
(#474) There should be a comma after the last array item in a multi-line array.
(#475) There should be a comma after the last array item in a multi-line array.
(#484) Data provider method "create_notices_provider" will need to be converted to static in future.
(#501) There should be a comma after the last array item in a multi-line array.
(#502) There should be a comma after the last array item in a multi-line array.
(#524) There should be a comma after the last array item in a multi-line array.
(#525) There should be a comma after the last array item in a multi-line array.
(#544) There should be a comma after the last array item in a multi-line array.
(#554) Line exceeds 132 characters; contains 160 characters
(#554) There should be a comma after the last array item in a multi-line array.
(#555) There should be a comma after the last array item in a multi-line array.
(#574) There should be a comma after the last array item in a multi-line array.
(#584) There should be a comma after the last array item in a multi-line array.
(#585) There should be a comma after the last array item in a multi-line array.
(#602) There should be a comma after the last array item in a multi-line array.
(#603) There should be a comma after the last array item in a multi-line array.
(#625) There should be a comma after the last array item in a multi-line array.
(#626) There should be a comma after the last array item in a multi-line array.
(#643) There should be a comma after the last array item in a multi-line array.
(#644) There should be a comma after the last array item in a multi-line array.
(#666) There should be a comma after the last array item in a multi-line array.
(#667) There should be a comma after the last array item in a multi-line array.
(#668) There should be a comma after the last array item in a multi-line array.

Javascript coding style problems

(0 errors, 29 warnings)

This section shows the coding style problems detected in the code by eslint [More info]

local/sitenotice/amd/src/modal_notice.js
(#89) Each then() should return a value or throw (promise/always-return)
(#181) 'next' declared on line 183 column 33 is used outside of binding context. (block-scoped-var)
(#183) 'next' is already defined. (no-redeclare)
(#183) 'next' declared on line 181 column 33 is used outside of binding context. (block-scoped-var)
(#185) 'next' declared on line 181 column 33 is used outside of binding context. (block-scoped-var)
(#185) 'next' declared on line 183 column 33 is used outside of binding context. (block-scoped-var)
local/sitenotice/amd/src/notice.js
(#42) Expected catch,fail,always() or return (promise/catch-or-return)
(#48) Each then() should return a value or throw (promise/always-return)
(#48) Unexpected space before function parentheses. (space-before-function-paren)
(#97) Unexpected space before function parentheses. (space-before-function-paren)
(#100) There should be no space after '{'. (@babel/object-curly-spacing)
(#100) There should be no space after '{'. (@babel/object-curly-spacing)
(#100) There should be no space before '}'. (@babel/object-curly-spacing)
(#104) Expected space(s) after "if". (keyword-spacing)
(#105) A space is required after ','. (comma-spacing)
(#118) Unexpected space before function parentheses. (space-before-function-paren)
(#121) There should be no space after '{'. (@babel/object-curly-spacing)
(#121) There should be no space after '{'. (@babel/object-curly-spacing)
(#121) There should be no space before '}'. (@babel/object-curly-spacing)
(#125) Expected space(s) after "if". (keyword-spacing)
(#126) A space is required after ','. (comma-spacing)
(#140) Unexpected space before function parentheses. (space-before-function-paren)
(#142) There should be no space after '{'. (@babel/object-curly-spacing)
(#142) There should be no space before '}'. (@babel/object-curly-spacing)
(#146) Expected space(s) after "if". (keyword-spacing)
(#147) A space is required after ','. (comma-spacing)
(#159) There should be no space after '{'. (@babel/object-curly-spacing)
(#159) There should be no space before '}'. (@babel/object-curly-spacing)
local/sitenotice/amd/src/notice_form.js
(#79) Extra space after key 'init'. (key-spacing)

CSS problems

(0 errors, 0 warnings)

This section shows CSS problems detected by stylelint [More info]


PHPDocs style problems

(0 errors, 0 warnings)

This section shows the phpdocs problems detected in the code by local_moodlecheck [More info]


Update savepoints problems

(0 errors, 0 warnings)

This section shows problems detected with the handling of upgrade savepoints [More info]


Third party library modification problems

(0 errors, 0 warnings)

This section shows problems detected with the modification of third party libraries [More info]


grunt changes

(2 errors, 0 warnings)

This section shows files built by grunt and not commited [More info]

local/sitenotice/amd/build/modal_notice.min.js
Uncommitted change detected.
local/sitenotice/amd/build/modal_notice.min.js.map
Uncommitted change detected.

shifter problems

(0 errors, 0 warnings)

This section shows problems detected by shifter [More info]


Mustache template problems

(0 errors, 0 warnings)

This section shows problems detected in mustache templates [More info]


Gherkin .feature problems

(0 errors, 0 warnings)

This section shows problems detected in behat .feature files [More info]