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

(146 errors, 142 warnings)

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

blocks/onlinesurvey/auth.php
(#20) Incorrect @package tag for file auth.php. Expected block_onlinesurvey, found mod_lti.
(#155) Line exceeds 132 characters; contains 139 characters
(#156) Line exceeds 132 characters; contains 148 characters
(#169) Whitespace found at end of line within string
(#170) Line exceeds 132 characters; contains 147 characters
(#174) Inline comments must start with a capital letter, digit or 3-dots sequence
(#174) This comment is 47% valid code; is this commented out code?
(#174) No space found before comment text; expected "// $r = '<form action="' . $redirecturi . "\" name=\"ltiAuthForm\" id=\"ltiAuthForm\" " ." but found "//$r = '<form action="' . $redirecturi . "\" name=\"ltiAuthForm\" id=\"ltiAuthForm\" " ."
(#175) Expected 1 space before comment text but found 5; use block comment if you need indentation
(#176) No space found before comment text; expected "// if (!empty($params)) {" but found "//if (!empty($params)) {"
(#177) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#178) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#179) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#180) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#181) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#182) No space found before comment text; expected "// }" but found "//}"
(#183) No space found before comment text; expected "// $r .= "</form>\n";" but found "//$r .= "</form>\n";"
(#184) No space found before comment text; expected "// $r .= "<script type=\"text/javascript\">\n" ." but found "//$r .= "<script type=\"text/javascript\">\n" ."
(#185) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#186) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#187) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#188) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#189) No space found before comment text; expected "// echo $r;" but found "//echo $r;"
blocks/onlinesurvey/block_onlinesurvey.php
(#37) Expected "bool" but found "boolean" for @var tag in member variable comment
(#40) Expected "bool" but found "boolean" for @var tag in member variable comment
(#43) Expected "string" but found "String" for @var tag in member variable comment
(#46) Expected "string" but found "String" for @var tag in member variable comment
(#49) Expected "string" but found "String" for @var tag in member variable comment
(#52) Expected "int" but found "Int" for @var tag in member variable comment
(#167) global $PAGE cannot be used in block classes. Use $this->page.
(#253) Short array syntax must be used to define arrays
(#257) Short array syntax must be used to define arrays
(#282) Missing docblock for function instance_allow_config
(#282) Visibility must be declared on method "instance_allow_config"
(#310) Short array syntax must be used to define arrays
blocks/onlinesurvey/certs.php
(#20) Incorrect @package tag for file certs.php. Expected block_onlinesurvey, found mod_lti.
(#33) Expected "try {\n...} catch (...) {\n"; found "try {\n...} catch(...) {\n"
(#37) Empty CATCH statement detected
(#38) Inline comments must start with a capital letter, digit or 3-dots sequence
(#38) Inline comments must end in full-stops, exclamation marks, or question marks
(#39) File must end with a newline character
blocks/onlinesurvey/classes/local/ltiopenid/jwks_helper.php
(#1) DocBlock missing a @package tag for file jwks_helper.php. Expected @package block_onlinesurvey
(#17) Missing @copyright tag
(#30) DocBlock missing a @package tag for class jwks_helper. Expected @package block_onlinesurvey
(#43) There should be a comma after the last array item in a multi-line array.
(#56) There should be a comma after the last array item in a multi-line array.
(#65) Short array syntax must be used to define arrays
(#65) Short array syntax must be used to define arrays
(#76) Short array syntax must be used to define arrays
blocks/onlinesurvey/classes/local/ltiopenid/registration_exception.php
(#20) Incorrect @package tag for file registration_exception.php. Expected block_onlinesurvey, found mod_lti.
blocks/onlinesurvey/classes/local/ltiopenid/registration_helper.php
(#20) Incorrect @package tag for file registration_helper.php. Expected block_onlinesurvey, found mod_lti.
(#284) Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $type.
(#383) Short array syntax must be used to define arrays
(#408) Short array syntax must be used to define arrays
(#446) There must not be a space before the colon in a return type declaration
blocks/onlinesurvey/classes/privacy/provider.php
(#34) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#54) There must not be a space before the colon in a return type declaration
(#84) There should be a comma after the last array item in a multi-line array.
(#98) There must not be a space before the colon in a return type declaration
blocks/onlinesurvey/db/access.php
(#27) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#32) Short array syntax must be used to define arrays
(#33) There should be a comma after the last array item in a multi-line array.
(#37) Short array syntax must be used to define arrays
(#40) Short array syntax must be used to define arrays
(#42) There should be a comma after the last array item in a multi-line array.
(#45) There should be a comma after the last array item in a multi-line array.
(#48) Short array syntax must be used to define arrays
(#51) Short array syntax must be used to define arrays
(#52) There should be a comma after the last array item in a multi-line array.
(#55) There should be a comma after the last array item in a multi-line array.
(#58) Short array syntax must be used to define arrays
(#61) Short array syntax must be used to define arrays
(#62) There should be a comma after the last array item in a multi-line array.
blocks/onlinesurvey/db/upgrade.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#48) Short array syntax must be used to define arrays
(#49) Short array syntax must be used to define arrays
blocks/onlinesurvey/edit_form.php
(#17) Missing @copyright tag
(#32) Opening brace should be on the same line as the declaration for class block_onlinesurvey_edit_form
(#33) Missing docblock for function specific_definition
(#34) Opening brace should be on the same line as the declaration
(#42) Expected "foreach (...) {\n"; found "foreach(...) {\n"
(#48) Line exceeds 132 characters; contains 137 characters
(#62) File must end with a newline character
blocks/onlinesurvey/lang/en/block_onlinesurvey.php
(#32) The string key "lti" is not in the correct order, it should be before "pluginname"
(#38) Unexpected comment found. Auto-fixing will not work after this comment
(#39) Unexpected comment found. Auto-fixing will not work after this comment
(#41) The string key "setting_heading_appearance" is not in the correct order, it should be before "soap"
(#44) The string key "setting_blocktitle" is not in the correct order, it should be before "setting_heading_appearance_desc"
(#49) The string key "setting_presentation_brief" is not in the correct order, it should be before "setting_presentation_desc"
(#55) The string key "setting_offer_zoom" is not in the correct order, it should be before "setting_survey_hide_empty_desc"
(#64) The string key "setting_survey_popupinfo_title" is not in the correct order, it should be before "setting_survey_show_popupinfo_desc"
(#66) The string key "setting_survey_popupinfo_title_default" is not in the correct order, it should be before "setting_survey_popupinfo_title_desc"
(#68) The string key "setting_survey_popupinfo_content" is not in the correct order, it should be before "setting_survey_popupinfo_title_default"
(#70) The string key "setting_survey_popupinfo_content_default" is not in the correct order, it should be before "setting_survey_popupinfo_content_desc"
(#78) Unexpected comment found. Auto-fixing will not work after this comment
(#79) Unexpected comment found. Auto-fixing will not work after this comment
(#81) The string key "setting_heading_communication" is not in the correct order, it should be before "setting_survey_popupinfo_content_default"
(#84) The string key "setting_communication_interface" is not in the correct order, it should be before "setting_heading_communication_desc"
(#90) The string key "setting_customfieldnumberinevasys" is not in the correct order, it should be before "setting_useridentifier_desc"
(#92) The string key "setting_customfieldnumber" is not in the correct order, it should be before "setting_customfieldnumberinevasys_desc"
(#98) Unexpected comment found. Auto-fixing will not work after this comment
(#99) Unexpected comment found. Auto-fixing will not work after this comment
(#100) The string key "onlyrequiredforlti13" is not in the correct order, it should be before "setting_survey_timeout_desc"
(#103) The string key "publickey_help" is not in the correct order, it should be before "setting_heading_lti13_desc"
(#106) The string key "accesstoken" is not in the correct order, it should be before "publickeyset"
(#112) The string key "lti13_infos" is not in the correct order, it should be before "setting_lti_redirectionuris_desc"
(#113) The string key "deploymentid" is not in the correct order, it should be before "lti13_infos"
(#114) The string key "clientid" is not in the correct order, it should be before "deploymentid"
(#117) Unexpected comment found. Auto-fixing will not work after this comment
(#118) Unexpected comment found. Auto-fixing will not work after this comment
(#126) The string key "setting_survey_login" is not in the correct order, it should be before "setting_survey_server_desc"
(#132) The string key "setting_survey_pwd" is not in the correct order, it should be before "setting_survey_user_desc"
(#135) The string key "setting_soap_request_eachtime" is not in the correct order, it should be before "setting_survey_pwd_desc"
(#140) Unexpected comment found. Auto-fixing will not work after this comment
(#141) Unexpected comment found. Auto-fixing will not work after this comment
(#143) The string key "setting_heading_lti" is not in the correct order, it should be before "setting_soap_request_eachtime_desc"
(#146) The string key "setting_heading_lti10" is not in the correct order, it should be before "setting_heading_lti_desc"
(#152) The string key "setting_survey_lti_password" is not in the correct order, it should be before "setting_survey_lti_url_desc"
(#156) The string key "setting_lti_customparameters" is not in the correct order, it should be before "setting_survey_lti_password_desc"
(#167) Unexpected comment found. Auto-fixing will not work after this comment
(#168) Unexpected comment found. Auto-fixing will not work after this comment
(#170) The string key "setting_heading_expert" is not in the correct order, it should be before "setting_lti_learnermapping_desc"
(#176) The string key "setting_additionalcss" is not in the correct order, it should be before "setting_survey_debug_desc"
(#182) The string key "setting_lti_regex_instructor" is not in the correct order, it should be before "setting_lti_regex_learner_desc"
(#187) Unexpected comment found. Auto-fixing will not work after this comment
(#188) Unexpected comment found. Auto-fixing will not work after this comment
(#190) The string key "onlinesurvey:addinstance" is not in the correct order, it should be before "setting_lti_regex_instructor_desc"
(#197) Unexpected comment found. Auto-fixing will not work after this comment
(#198) Unexpected comment found. Auto-fixing will not work after this comment
(#202) The string key "allsurveys" is not in the correct order, it should be before "surveys_exist_not"
(#207) Unexpected comment found. Auto-fixing will not work after this comment
(#208) Unexpected comment found. Auto-fixing will not work after this comment
(#210) The string key "error_config_not_accessible" is not in the correct order, it should be before "zoomsurveylist"
(#229) Unexpected comment found. Auto-fixing will not work after this comment
(#230) Unexpected comment found. Auto-fixing will not work after this comment
(#238) Unexpected comment found. Auto-fixing will not work after this comment
(#239) Unexpected comment found. Auto-fixing will not work after this comment
(#244) Unexpected comment found. Auto-fixing will not work after this comment
(#245) Unexpected comment found. Auto-fixing will not work after this comment
blocks/onlinesurvey/launch.php
(#38) Incorrect @package tag for file launch.php. Expected block_onlinesurvey, found mod_lti.
(#59) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
blocks/onlinesurvey/locallib.php
(#49) Opening brace should be on the same line as the declaration
(#110) Short array syntax must be used to define arrays
(#111) There should be a comma after the last array item in a multi-line array.
(#198) Line exceeds 132 characters; contains 133 characters
(#216) Opening brace should be on the same line as the declaration
(#281) Opening brace should be on the same line as the declaration
(#296) Opening brace should be on the same line as the declaration
(#312) Opening brace should be on the same line as the declaration
(#335) Opening brace should be on the same line as the declaration
(#351) Opening brace should be on the same line as the declaration
(#362) Short array syntax must be used to define arrays
(#370) Short array syntax must be used to define arrays
(#372) There should be a comma after the last array item in a multi-line array.
(#411) Opening brace should be on the same line as the declaration
(#434) Opening brace should be on the same line as the declaration
(#472) Opening brace should be on the same line as the declaration
(#556) Inline comments must start with a capital letter, digit or 3-dots sequence
(#556) This comment is 62% valid code; is this commented out code?
(#576) Line exceeds 132 characters; contains 135 characters
(#577) Opening brace should be on the same line as the declaration
(#633) Line exceeds 132 characters; contains 137 characters
(#633) Inline comments must start with a capital letter, digit or 3-dots sequence
(#633) Inline comments must end in full-stops, exclamation marks, or question marks
(#650) Short array syntax must be used to define arrays
(#673) Logical operator "or" is prohibited; use "||" instead
(#684) Line exceeds 132 characters; contains 136 characters
(#684) Inline comments must end in full-stops, exclamation marks, or question marks
(#691) Inline comments must start with a capital letter, digit or 3-dots sequence
(#691) This comment is 50% valid code; is this commented out code?
(#691) Line indented incorrectly; expected at least 12 spaces, found 0
(#691) Expected 1 space before comment text but found 12; use block comment if you need indentation
(#722) Short array syntax must be used to define arrays
(#733) Opening brace should be on the same line as the declaration
(#738) Short array syntax must be used to define arrays
(#763) Inline comments must start with a capital letter, digit or 3-dots sequence
(#764) Line indented incorrectly; expected at least 4 spaces, found 0
(#764) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#765) Line indented incorrectly; expected at least 4 spaces, found 0
(#765) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#766) Line indented incorrectly; expected at least 4 spaces, found 0
(#766) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#767) Line indented incorrectly; expected at least 4 spaces, found 0
(#767) Expected 1 space before comment text but found 8; use block comment if you need indentation
(#768) Inline comments must end in full-stops, exclamation marks, or question marks
(#768) Line indented incorrectly; expected at least 4 spaces, found 0
(#768) Expected 1 space before comment text but found 4; use block comment if you need indentation
(#772) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#797) Inline comments must start with a capital letter, digit or 3-dots sequence
(#797) This comment is 69% valid code; is this commented out code?
(#806) Inline comments must start with a capital letter, digit or 3-dots sequence
(#806) This comment is 70% valid code; is this commented out code?
(#821) Opening brace should be on the same line as the declaration
(#824) Short array syntax must be used to define arrays
(#836) The use of function error_log() is forbidden; use debugging() instead
(#848) The use of function error_log() is forbidden; use debugging() instead
(#880) Opening brace should be on the same line as the declaration
(#883) Short array syntax must be used to define arrays
(#918) Short array syntax must be used to define arrays
(#935) Short array syntax must be used to define arrays
(#939) Variable "rawResponse" must be all lower-case
(#940) Variable "rawResponse" must be all lower-case
(#940) Variable "responseItem" must be all lower-case
(#941) Variable "responseItem" must be all lower-case
(#943) Variable "keyName" must be all lower-case
(#945) Variable "keyName" must be all lower-case
(#946) Variable "keyName" must be all lower-case
(#947) Variable "keyName" must be all lower-case
(#951) Variable "keyName" must be all lower-case
(#959) Missing docblock for function block_onlinesurvey_lti_initiate_login
(#961) Opening brace should be on the same line as the declaration
(#986) Missing docblock for function block_onlinesurvey_lti_initiate_login_via_curl
(#988) Opening brace should be on the same line as the declaration
(#1007) Opening brace should be on the same line as the declaration
(#1016) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#1025) Short array syntax must be used to define arrays
(#1035) Missing docblock for function block_onlinesurvey_settings_updated
(#1036) Opening brace should be on the same line as the declaration
(#1048) Missing docblock for function block_onlinesurvey_get_clientid
(#1049) Opening brace should be on the same line as the declaration
(#1055) Missing docblock for function block_onlinesurvey_create_lti_type
(#1056) Opening brace should be on the same line as the declaration
(#1063) Missing docblock for function block_onlinesurvey_update_lti_type
(#1064) Opening brace should be on the same line as the declaration
(#1073) Missing docblock for function block_onlinesurvey_get_publickeyset
(#1074) Opening brace should be on the same line as the declaration
(#1085) Missing docblock for function block_onlinesurvey_get_params
(#1086) Opening brace should be on the same line as the declaration
(#1115) There should be a comma after the last array item in a multi-line array.
(#1154) Missing docblock for function block_onlinesurvey_get_lti_typeid
(#1155) Opening brace should be on the same line as the declaration
(#1159) Missing docblock for function block_onlinesurvey_get_lti_type
(#1160) Opening brace should be on the same line as the declaration
(#1168) Missing docblock for function block_onlinesurvey_get_lti_type_config
(#1169) Opening brace should be on the same line as the declaration
(#1183) Missing docblock for function block_onlinesurvey_get_launch_config
(#1184) Opening brace should be on the same line as the declaration
(#1204) Missing docblock for function block_onlinesurvey_get_accesstoken
(#1205) Opening brace should be on the same line as the declaration
(#1212) Missing docblock for function block_onlinesurvey_get_authrequest
(#1213) Opening brace should be on the same line as the declaration
(#1228) Short array syntax must be used to define arrays
(#1243) Missing docblock for function block_onlinesurvey_get_summary
(#1262) Line exceeds 132 characters; contains 134 characters
(#1300) Missing docblock for function block_onlinesurvey_remove_outdated_cookies
(#1300) Variable "currentState" must be all lower-case
(#1301) Expected "foreach (...) {\n"; found "foreach(...) {\n"
(#1302) Variable "currentState" must be all lower-case
(#1306) Variable "currentState" must be all lower-case
(#1311) File must end with a newline character
blocks/onlinesurvey/onlinesurvey_soap_client.php
(#70) Short array syntax must be used to define arrays
(#87) Short array syntax must be used to define arrays
(#107) Logical operator "and" is prohibited; use "&&" instead
(#128) method name "onlinesurvey_soap_client::__doRequest" is invalid; only PHP magic methods should be prefixed with a double underscore
(#128) Variable "one_way" must not contain underscores.
(#129) Short array syntax must be used to define arrays
(#132) There should be a comma after the last array item in a multi-line array.
(#136) Short array syntax must be used to define arrays
(#154) Short array syntax must be used to define arrays
blocks/onlinesurvey/settings.php
(#58) Short array syntax must be used to define arrays
(#152) Short array syntax must be used to define arrays
(#168) Short array syntax must be used to define arrays
(#183) Short array syntax must be used to define arrays
(#223) Inline comments must start with a capital letter, digit or 3-dots sequence
(#236) Inline comments must start with a capital letter, digit or 3-dots sequence
(#249) Inline comments must start with a capital letter, digit or 3-dots sequence
(#261) Inline comments must start with a capital letter, digit or 3-dots sequence
(#324) Short array syntax must be used to define arrays
(#340) Short array syntax must be used to define arrays
(#352) Short array syntax must be used to define arrays
(#454) Expected "foreach (...) {\n"; found "foreach(...) {\n"
blocks/onlinesurvey/show_surveys.php
(#32) Expected "try {\n...} catch (...) {\n"; found "try {\n...} catch(...) {\n"
(#39) Line indented incorrectly; expected at least 4 spaces, found 0
(#43) Short array syntax must be used to define arrays
(#79) Empty IF statement detected
(#80) Inline comments must start with a capital letter, digit or 3-dots sequence
(#80) Inline comments must end in full-stops, exclamation marks, or question marks
(#103) Short array syntax must be used to define arrays
(#144) Empty CATCH statement detected
(#145) Inline comments must start with a capital letter, digit or 3-dots sequence
(#145) Inline comments must end in full-stops, exclamation marks, or question marks
(#146) File must end with a newline character
blocks/onlinesurvey/token.php
(#20) Incorrect @package tag for file token.php. Expected block_onlinesurvey, found mod_lti.
(#68) Short array syntax must be used to define arrays
(#84) Short array syntax must be used to define arrays
(#115) File must end with a newline character

Javascript coding style problems

(0 errors, 0 warnings)

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


CSS problems

(1 errors, 0 warnings)

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

blocks/onlinesurvey/style/block_onlinesurvey_modal-zoom.css
(#67) Unexpected URL scheme "data:" (function-url-scheme-disallowed-list)

PHPDocs style problems

(3 errors, 0 warnings)

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

blocks/onlinesurvey/locallib.php
(#465) Phpdocs for function block_onlinesurvey_get_lti_content has incomplete parameters list
(#570) Phpdocs for function block_onlinesurvey_lti_get_launch_data has incomplete parameters list
(#727) Phpdocs for function block_onlinesurvey_build_request_lti has incomplete parameters list

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]

blocks/onlinesurvey/amd/build/modal-zoom.min.js.map
Uncommitted change detected.
blocks/onlinesurvey/amd/build/spinner.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, 3 warnings)

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

blocks/onlinesurvey/templates/compactview/nosurveys.mustache
(#1) Example context missing (@template section not found.)
blocks/onlinesurvey/templates/compactview/nosurveys_zoom.mustache
(#1) Example context missing (@template section not found.)
blocks/onlinesurvey/templates/compactview/surveys.mustache
(#1) Example context missing (@template section not found.)

Gherkin .feature problems

(0 errors, 0 warnings)

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