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

(54 errors, 85 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
(#178) Line exceeds 132 characters; contains 142 characters
(#184) 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
(#71) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $filters is optional, while parameter $noticeid is required. The $filters parameter is implicitly treated as a required parameter.
(#72) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $download is optional, while parameter $noticeid is required. The $download parameter is implicitly treated as a required parameter.
(#72) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $page is optional, while parameter $noticeid is required. The $page parameter is implicitly treated as a required parameter.
(#72) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $perpage is optional, while parameter $noticeid is required. The $perpage parameter is implicitly treated as a required parameter.
(#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
(#62) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $filters is optional, while parameter $noticeid is required. The $filters parameter is implicitly treated as a required parameter.
(#62) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $download is optional, while parameter $noticeid is required. The $download parameter is implicitly treated as a required parameter.
(#63) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $page is optional, while parameter $noticeid is required. The $page parameter is implicitly treated as a required parameter.
(#63) Declaring an optional parameter before a required parameter is deprecated since PHP 8.0. Parameter $perpage is optional, while parameter $noticeid is required. The $perpage parameter is implicitly treated as a required parameter.
(#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/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
local/sitenotice/tests/helper_test.php
(#33) Test method test_built_cohort_options() is missing any coverage information, own or at class level
(#52) Test method test_can_have_html_in_notice_content() is missing any coverage information, own or at class level
(#79) Test method test_format_interval_time() is missing any coverage information, own or at class level
(#90) Test method test_cohort_options() is missing any coverage information, own or at class level
local/sitenotice/tests/sitenotice_test.php
(#50) Test method test_create_notices() is missing any coverage information, own or at class level
(#87) Data provider should not end with "()". "generic_provider()" provided.
(#90) Test method test_reset_notices() is missing any coverage information, own or at class level
(#120) Data provider should not end with "()". "generic_provider()" provided.
(#123) Test method test_enable_notices() is missing any coverage information, own or at class level
(#156) Data provider should not end with "()". "generic_provider()" provided.
(#159) Test method test_user_notice() is missing any coverage information, own or at class level
(#229) Data provider should not end with "()". "generic_provider()" provided.
(#232) Test method test_user_hlink_interact() is missing any coverage information, own or at class level
(#263) Test method test_user_required_completion() is missing any coverage information, own or at class level
(#269) Line exceeds 132 characters; contains 153 characters
(#272) Short array syntax must be used to define arrays
(#280) Short array syntax must be used to define arrays
(#284) Short array syntax must be used to define arrays
(#285) Short array syntax must be used to define arrays
(#286) Short array syntax must be used to define arrays
(#287) Short array syntax must be used to define arrays
(#307) Short array syntax must be used to define arrays
(#319) Test method test_retrieve_user_notices_when_dismissed_one_that_requires_acknowledgement() is missing any coverage information, own or at class level
(#346) Test method test_retrieve_user_notices_when_dismiss_and_then_acknowledged() is missing any coverage information, own or at class level
(#383) Test method test_retrieve_user_notices_when_force_logout() is missing any coverage information, own or at class level
(#427) Data provider method "generic_provider" will need to be converted to static in future.
(#427) Data provider method "generic_provider" will need to be converted to static in future.
(#427) Data provider method "generic_provider" will need to be converted to static in future.
(#427) Data provider method "generic_provider" will need to be converted to static in future.
(#427) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#427) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#427) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#427) Data provider method "generic_provider" must return an array, a Generator or an Iterable.
(#452) There should be a comma after the last array item in a multi-line array.
(#453) There should be a comma after the last array item in a multi-line array.
(#454) There should be a comma after the last array item in a multi-line array.
(#463) Data provider method "create_notices_provider" will need to be converted to static in future.
(#480) There should be a comma after the last array item in a multi-line array.
(#481) There should be a comma after the last array item in a multi-line array.
(#503) There should be a comma after the last array item in a multi-line array.
(#504) There should be a comma after the last array item in a multi-line array.
(#523) There should be a comma after the last array item in a multi-line array.
(#533) Line exceeds 132 characters; contains 160 characters
(#533) There should be a comma after the last array item in a multi-line array.
(#534) There should be a comma after the last array item in a multi-line array.
(#553) There should be a comma after the last array item in a multi-line array.
(#563) There should be a comma after the last array item in a multi-line array.
(#564) There should be a comma after the last array item in a multi-line array.
(#581) There should be a comma after the last array item in a multi-line array.
(#582) There should be a comma after the last array item in a multi-line array.
(#604) There should be a comma after the last array item in a multi-line array.
(#605) There should be a comma after the last array item in a multi-line array.
(#622) There should be a comma after the last array item in a multi-line array.
(#623) There should be a comma after the last array item in a multi-line array.
(#645) There should be a comma after the last array item in a multi-line array.
(#646) There should be a comma after the last array item in a multi-line array.
(#647) There should be a comma after the last array item in a multi-line array.

Javascript coding style problems

(0 errors, 39 warnings)

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

local/sitenotice/amd/src/modal_notice.js
(#92) Multiple spaces found before '='. (no-multi-spaces)
(#94) Each then() should return a value or throw (promise/always-return)
(#98) Unquoted reserved word 'class' used as key. (quote-props)
(#186) 'next' declared on line 188 column 29 is used outside of binding context. (block-scoped-var)
(#186) Operator '+' must be spaced. (space-infix-ops)
(#188) 'next' is already defined. (no-redeclare)
(#188) 'next' declared on line 186 column 29 is used outside of binding context. (block-scoped-var)
(#188) Operator '-' must be spaced. (space-infix-ops)
(#190) 'next' declared on line 186 column 29 is used outside of binding context. (block-scoped-var)
(#190) 'next' declared on line 188 column 29 is used outside of binding context. (block-scoped-var)
local/sitenotice/amd/src/notice.js
(#10) Unexpected space before function parentheses. (space-before-function-paren)
(#36) Unexpected space before function parentheses. (space-before-function-paren)
(#42) Expected catch,fail() 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)
local/sitenotice/amd/src/preview.js
(#10) Unexpected space before function parentheses. (space-before-function-paren)
(#17) Expected catch,fail() or return (promise/catch-or-return)
(#23) Each then() should return a value or throw (promise/always-return)
(#23) Unexpected space before function parentheses. (space-before-function-paren)

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

(0 errors, 0 warnings)

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


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]