Prechecker results: error


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

(11 errors, 25 warnings)

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

mod/livepoll/backup/moodle2/backup_livepoll_activity_task.class.php
(#58) The static declaration must come after the visibility declaration
mod/livepoll/backup/moodle2/backup_livepoll_settingslib.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/backup/moodle2/backup_livepoll_stepslib.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/backup/moodle2/restore_livepoll_activity_task.class.php
(#54) The static declaration must come after the visibility declaration
(#65) The static declaration must come after the visibility declaration
(#77) The static declaration must come after the visibility declaration
(#90) The static declaration must come after the visibility declaration
mod/livepoll/backup/moodle2/restore_livepoll_stepslib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/event/course_module_instance_list_viewed.php
(#24) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/event/course_module_viewed.php
(#24) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/output/mobile.php
(#24) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#97) File must end with a newline character
mod/livepoll/classes/privacy/provider.php
(#37) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/barchart_text_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/doughnutchart_text_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/piechart_text_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/polarareachart_text_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/radarchart_text_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/rendering_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/classes/result/text_only_strategy.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/db/mobile.php
(#46) File must end with a newline character
mod/livepoll/db/services.php
(#34) File must end with a newline character
mod/livepoll/db/upgrade.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#75) TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
(#81) Variable "httpCode" must be all lower-case
(#82) Variable "httpCode" must be all lower-case
mod/livepoll/index.php
(#84) Logical operator "or" is prohibited; use "||" instead
mod/livepoll/lib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/livepoll/tests/poll_handler_test.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#35) PHPUnit testcase name "mod_livepoll_poll_handler_testcase" does not match file name "poll_handler_test"
(#35) PHPUnit class "mod_livepoll_poll_handler_testcase" does not have any namespace. It is recommended to add it to the "mod_livepoll" namespace, using more levels if needed, in order to match the code being tested
mod/livepoll/tests/privacy_provider_test.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#37) PHPUnit testcase name "mod_livepoll_privacy_provider_testcase" does not match file name "privacy_provider_test"
(#37) PHPUnit class "mod_livepoll_privacy_provider_testcase" does not have any namespace. It is recommended to add it to the "mod_livepoll" namespace, using more levels if needed, in order to match the code being tested
mod/livepoll/view.php
(#28) This comment is 43% valid code; is this commented out code?
(#43) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead

Javascript coding style problems

(49 errors, 54 warnings)

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

mod/livepoll/amd/src/barchart-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#52) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#52) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#57) Expected variable declaration to be on a new line. (one-var-declaration-per-line)
(#84) Missing JSDoc @param "options" declaration. (jsdoc/require-param)
(#84) Missing JSDoc @param "votes" declaration. (jsdoc/require-param)
(#84) Missing JSDoc @param "callback" declaration. (jsdoc/require-param)
(#84) Missing JSDoc for parameter 'options'. (valid-jsdoc)
(#84) Missing JSDoc for parameter 'votes'. (valid-jsdoc)
(#84) Missing JSDoc for parameter 'callback'. (valid-jsdoc)
mod/livepoll/amd/src/bold-text-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#25) Missing JSDoc @param "decoratedResult" declaration. (jsdoc/require-param)
(#25) Missing JSDoc for parameter 'decoratedResult'. (valid-jsdoc)
(#38) Missing JSDoc @param "options" declaration. (jsdoc/require-param)
(#38) Missing JSDoc @param "votes" declaration. (jsdoc/require-param)
(#38) Missing JSDoc for parameter 'options'. (valid-jsdoc)
(#38) Missing JSDoc for parameter 'votes'. (valid-jsdoc)
(#44) A space is required after ','. (comma-spacing)
(#48) A space is required after ','. (comma-spacing)
mod/livepoll/amd/src/decorated-text-result.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#42) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#42) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#43) Missing JSDoc @param "votes" type. (jsdoc/require-param-type)
(#43) Missing JSDoc parameter type for 'votes'. (valid-jsdoc)
mod/livepoll/amd/src/doughnutchart-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
mod/livepoll/amd/src/green-text-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#25) Missing JSDoc @param "decoratedResult" declaration. (jsdoc/require-param)
(#25) Missing JSDoc for parameter 'decoratedResult'. (valid-jsdoc)
(#38) Missing JSDoc @param "options" declaration. (jsdoc/require-param)
(#38) Missing JSDoc @param "votes" declaration. (jsdoc/require-param)
(#38) Missing JSDoc for parameter 'options'. (valid-jsdoc)
(#38) Missing JSDoc for parameter 'votes'. (valid-jsdoc)
mod/livepoll/amd/src/livepoll-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#45) Missing space before opening brace. (space-before-blocks)
(#51) Expected catch,fail() or return (promise/catch-or-return)
(#52) Each then() should return a value or throw (promise/always-return)
(#112) Expected catch,fail() or return (promise/catch-or-return)
(#112) Each then() should return a value or throw (promise/always-return)
(#116) There should be no space after this paren. (space-in-parens)
(#116) There should be no space before this paren. (space-in-parens)
(#133) Expected catch,fail() or return (promise/catch-or-return)
(#149) Expected catch,fail() or return (promise/catch-or-return)
(#149) Each then() should return a value or throw (promise/always-return)
(#165) Each then() should return a value or throw (promise/always-return)
(#196) Expected variable declaration to be on a new line. (one-var-declaration-per-line)
(#206) Expected variable declaration to be on a new line. (one-var-declaration-per-line)
(#283) Missing JSDoc @param "apiKey" type. (jsdoc/require-param-type)
(#283) Missing JSDoc parameter type for 'apiKey'. (valid-jsdoc)
(#284) Missing JSDoc @param "authDomain" type. (jsdoc/require-param-type)
(#284) Missing JSDoc parameter type for 'authDomain'. (valid-jsdoc)
(#285) Missing JSDoc @param "databaseURL" type. (jsdoc/require-param-type)
(#285) Missing JSDoc parameter type for 'databaseURL'. (valid-jsdoc)
(#286) Missing JSDoc @param "projectID" type. (jsdoc/require-param-type)
(#286) Missing JSDoc parameter type for 'projectID'. (valid-jsdoc)
(#287) Missing JSDoc @param "pollKey" type. (jsdoc/require-param-type)
(#287) Missing JSDoc parameter type for 'pollKey'. (valid-jsdoc)
(#288) Missing JSDoc @param "userKey" type. (jsdoc/require-param-type)
(#288) Missing JSDoc parameter type for 'userKey'. (valid-jsdoc)
(#289) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#289) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#290) Missing JSDoc @param "correctOption" type. (jsdoc/require-param-type)
(#290) Missing JSDoc parameter type for 'correctOption'. (valid-jsdoc)
(#291) Missing JSDoc @param "resultsToRender" type. (jsdoc/require-param-type)
(#291) Missing JSDoc parameter type for 'resultsToRender'. (valid-jsdoc)
mod/livepoll/amd/src/piechart-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
mod/livepoll/amd/src/polarareachart-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
mod/livepoll/amd/src/radarchart-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
mod/livepoll/amd/src/result.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#35) Missing JSDoc @returns for function. (valid-jsdoc)
(#38) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#38) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#39) Missing JSDoc @param "votes" type. (jsdoc/require-param-type)
(#39) Missing JSDoc parameter type for 'votes'. (valid-jsdoc)
(#51) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#51) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#52) Missing JSDoc @param "votes" type. (jsdoc/require-param-type)
(#52) Missing JSDoc parameter type for 'votes'. (valid-jsdoc)
(#53) Missing JSDoc @param "callback" type. (jsdoc/require-param-type)
(#53) Missing JSDoc parameter type for 'callback'. (valid-jsdoc)
mod/livepoll/amd/src/shadowy-text-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#25) Missing JSDoc @param "decoratedResult" declaration. (jsdoc/require-param)
(#25) Missing JSDoc for parameter 'decoratedResult'. (valid-jsdoc)
(#38) Missing JSDoc @param "options" declaration. (jsdoc/require-param)
(#38) Missing JSDoc @param "votes" declaration. (jsdoc/require-param)
(#38) Missing JSDoc for parameter 'options'. (valid-jsdoc)
(#38) Missing JSDoc for parameter 'votes'. (valid-jsdoc)
mod/livepoll/amd/src/text-result-lazy.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#40) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#40) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#41) Missing JSDoc @param "votes" type. (jsdoc/require-param-type)
(#41) Missing JSDoc parameter type for 'votes'. (valid-jsdoc)
(#52) Missing JSDoc @param "options" declaration. (jsdoc/require-param)
(#52) Missing JSDoc @param "votes" declaration. (jsdoc/require-param)
(#52) Missing JSDoc @param "callback" declaration. (jsdoc/require-param)
(#52) Missing JSDoc for parameter 'options'. (valid-jsdoc)
(#52) Missing JSDoc for parameter 'votes'. (valid-jsdoc)
(#52) Missing JSDoc for parameter 'callback'. (valid-jsdoc)
mod/livepoll/amd/src/util.js
(#19) @package should be empty. (jsdoc/empty-tags)
(#29) Missing JSDoc @param "options" type. (jsdoc/require-param-type)
(#29) Missing JSDoc parameter type for 'options'. (valid-jsdoc)
(#30) Missing JSDoc @param "votes" type. (jsdoc/require-param-type)
(#30) Missing JSDoc parameter type for 'votes'. (valid-jsdoc)
(#34) Expected variable declaration to be on a new line. (one-var-declaration-per-line)

CSS problems

(0 errors, 2 warnings)

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

mod/livepoll/styles.css
(#47) Expected "#2196F3" to be "#2196f3" (color-hex-case)
(#51) Expected "#2196F3" to be "#2196f3" (color-hex-case)

PHPDocs style problems

(2 errors, 7 warnings)

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

mod/livepoll/.kow-plugin.php
(#2) Empty line found after PHP open tag
(#1) File-level phpdocs block is not found
mod/livepoll/classes/privacy/provider.php
(#63) Function provider::get_contexts_for_userid is not documented
(#67) Function provider::export_user_data is not documented
(#70) Function provider::delete_data_for_all_users_in_context is not documented
(#73) Function provider::delete_data_for_user is not documented
(#76) Function provider::get_users_in_context is not documented
(#79) Function provider::delete_data_for_users is not documented
(#18) Inline phpdocs tag {@link \mod_livepoll\privacy\provider} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}

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

(1 errors, 1 warnings)

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

Problems running grunt
Task "eslint:amd" failed. Use --force to continue.

shifter problems

(0 errors, 0 warnings)

This section shows problems detected by shifter [More info]


Mustache template problems

(0 errors, 12 warnings)

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

mod/livepoll/templates/mobile_view_page.mustache
(#1) HTML Validation error, line 21: Attribute “core-link” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation error, line 21: Attribute “autologin” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation error, line 21: Attribute “inapp” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation error, line 30: Attribute “core-link” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation error, line 30: Attribute “autologin” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation error, line 30: Attribute “inapp” not allowed on element “a” at this point. ( <a href="https://live.poll" core-link autoLogin="yes" inApp="true"> )
(#1) HTML Validation info, line 39: Attribute “[params]” is not serializable as XML 1.0. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)
(#1) HTML Validation info, line 39: Attribute “[presets]” is not serializable as XML 1.0. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)
(#1) HTML Validation error, line 39: Attribute “core-site-plugins-call-ws-on-load” not allowed on element “span” at this point. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)
(#1) HTML Validation error, line 39: Attribute “name” not allowed on element “span” at this point. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)
(#1) HTML Validation error, line 39: Attribute “[params]” not allowed on element “span” at this point. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)
(#1) HTML Validation error, line 39: Attribute “[presets]” not allowed on element “span” at this point. (. --> <span core-site-plugins-call-ws-on-load name="mod_livepoll_view_livepoll" [params]="{livepollid: 30}" [preSets]="{getFromCache: 0, saveToCache: 0}"></span)

Gherkin .feature problems

(0 errors, 0 warnings)

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