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

(433 errors, 304 warnings)

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

mod/scratchpad/backup/moodle2/backup_scratchpad_activity_task.class.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#39) The static declaration must come after the visibility declaration
mod/scratchpad/backup/moodle2/backup_scratchpad_stepslib.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Short array syntax must be used to define arrays
(#32) Short array syntax must be used to define arrays
(#37) Short array syntax must be used to define arrays
(#37) Short array syntax must be used to define arrays
(#46) Short array syntax must be used to define arrays
(#49) Short array syntax must be used to define arrays
mod/scratchpad/backup/moodle2/restore_scratchpad_activity_task.class.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#39) The static declaration must come after the visibility declaration
(#41) Short array syntax must be used to define arrays
(#42) Short array syntax must be used to define arrays
(#43) Short array syntax must be used to define arrays
(#48) The static declaration must come after the visibility declaration
(#50) Short array syntax must be used to define arrays
(#62) Short array syntax must be used to define arrays
(#74) Short array syntax must be used to define arrays
mod/scratchpad/backup/moodle2/restore_scratchpad_stepslib.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#25) Whitespace found at end of line
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Short array syntax must be used to define arrays
mod/scratchpad/classes/event/course_module_instance_list_viewed.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/scratchpad/classes/event/course_module_viewed.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#57) Short array syntax must be used to define arrays
(#66) Short array syntax must be used to define arrays
(#67) Short array syntax must be used to define arrays
mod/scratchpad/classes/event/entries_viewed.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#63) Whitespace found at end of line within string
(#72) Short array syntax must be used to define arrays
(#81) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
mod/scratchpad/classes/event/entry_created.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#72) Short array syntax must be used to define arrays
(#81) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
mod/scratchpad/classes/event/entry_updated.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#72) Short array syntax must be used to define arrays
(#81) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
mod/scratchpad/classes/event/feedback_updated.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#63) Whitespace found at end of line within string
(#72) Short array syntax must be used to define arrays
(#81) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
mod/scratchpad/classes/privacy/provider.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#22) Whitespace found at end of line
(#55) There must not be a space before the colon in a return type declaration
(#77) There must not be a space before the colon in a return type declaration
(#79) Whitespace found at end of line within string
(#80) Whitespace found at end of line within string
(#81) Whitespace found at end of line within string
(#82) Whitespace found at end of line within string
(#83) Whitespace found at end of line within string
(#84) Whitespace found at end of line within string
(#85) Whitespace found at end of line within string
(#86) Whitespace found at end of line within string
(#87) Whitespace found at end of line within string
(#88) Whitespace found at end of line within string
(#89) Whitespace found at end of line within string
(#112) Whitespace found at end of line within string
(#113) Whitespace found at end of line within string
(#114) Whitespace found at end of line within string
(#115) Whitespace found at end of line within string
(#116) Whitespace found at end of line within string
(#117) Whitespace found at end of line within string
(#118) Whitespace found at end of line within string
(#119) Whitespace found at end of line within string
(#120) Whitespace found at end of line within string
(#121) Whitespace found at end of line within string
(#122) Whitespace found at end of line within string
(#145) Whitespace found at end of line within string
(#146) Whitespace found at end of line within string
(#147) Whitespace found at end of line within string
(#148) Whitespace found at end of line within string
(#149) Whitespace found at end of line within string
(#150) Whitespace found at end of line within string
(#151) Whitespace found at end of line within string
(#152) Whitespace found at end of line within string
(#153) Whitespace found at end of line within string
(#154) Whitespace found at end of line within string
(#155) Whitespace found at end of line within string
(#156) Whitespace found at end of line within string
(#208) Whitespace found at end of line within string
(#209) Whitespace found at end of line within string
(#210) Whitespace found at end of line within string
(#211) Whitespace found at end of line within string
(#212) Whitespace found at end of line within string
(#213) Whitespace found at end of line within string
(#214) Whitespace found at end of line within string
(#215) Whitespace found at end of line within string
(#245) Whitespace found at end of line within string
(#246) Whitespace found at end of line within string
(#247) Whitespace found at end of line within string
(#248) Whitespace found at end of line within string
(#249) Whitespace found at end of line within string
(#250) Whitespace found at end of line within string
(#251) Whitespace found at end of line within string
(#252) Whitespace found at end of line within string
(#253) Whitespace found at end of line within string
(#278) Whitespace found at end of line within string
(#279) Whitespace found at end of line within string
(#280) Whitespace found at end of line within string
(#281) Whitespace found at end of line within string
(#282) Whitespace found at end of line within string
(#283) Whitespace found at end of line within string
(#284) Whitespace found at end of line within string
(#285) Whitespace found at end of line within string
(#286) Whitespace found at end of line within string
mod/scratchpad/db/access.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#28) Short array syntax must be used to define arrays
(#30) Short array syntax must be used to define arrays
(#34) Short array syntax must be used to define arrays
(#37) There should be a comma after the last array item in a multi-line array.
(#38) There should be a comma after the last array item in a multi-line array.
(#41) Short array syntax must be used to define arrays
(#45) Short array syntax must be used to define arrays
(#48) There should be a comma after the last array item in a multi-line array.
(#49) There should be a comma after the last array item in a multi-line array.
(#52) Short array syntax must be used to define arrays
(#57) Short array syntax must be used to define arrays
(#59) There should be a comma after the last array item in a multi-line array.
(#61) There should be a comma after the last array item in a multi-line array.
(#62) There should be a comma after the last array item in a multi-line array.
mod/scratchpad/db/log.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#28) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#30) Short array syntax must be used to define arrays
(#31) Short array syntax must be used to define arrays
(#32) Short array syntax must be used to define arrays
(#33) Short array syntax must be used to define arrays
(#34) Short array syntax must be used to define arrays
(#34) There should be a comma after the last array item in a multi-line array.
mod/scratchpad/db/services.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#28) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#36) Short array syntax must be used to define arrays
(#36) There should be a comma after the last array item in a multi-line array.
(#38) Short array syntax must be used to define arrays
(#45) Short array syntax must be used to define arrays
(#45) There should be a comma after the last array item in a multi-line array.
(#47) File must end with a newline character
mod/scratchpad/db/upgrade.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#35) Perl-style comments are not allowed; use "// Comment." instead
(#36) Short array syntax must be used to define arrays
(#37) Short array syntax must be used to define arrays
(#40) Expected "foreach (...) {\n"; found "foreach (...){\n"
mod/scratchpad/download.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#33) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#36) Short array syntax must be used to define arrays
(#37) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#39) Short array syntax must be used to define arrays
(#48) Short array syntax must be used to define arrays
(#49) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#51) Inline comments must end in full-stops, exclamation marks, or question marks
(#51) No space found before comment text; expected "// Retrieve sections from course, sort by section and retrieve course module ids" but found "//Retrieve sections from course, sort by section and retrieve course module ids"
(#52) Short array syntax must be used to define arrays
(#53) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#56) Short array syntax must be used to define arrays
(#58) No space found before comment text; expected "// Retrieve scratchpad modules in the course, remove deleted/hiddden" but found "//Retrieve scratchpad modules in the course, remove deleted/hiddden"
(#59) Inline comments must end in full-stops, exclamation marks, or question marks
(#59) No space found before comment text; expected "// build $modulesearch for $item" but found "//build $modulesearch for $item"
(#59) Whitespace found at end of line
(#60) Short array syntax must be used to define arrays
(#62) Short array syntax must be used to define arrays
(#63) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#64) Expected "if (...) {\n"; found "if (...){\n"
(#66) Expected "} else {\n"; found "}else{\n"
(#70) Inline comments must start with a capital letter, digit or 3-dots sequence
(#70) No space found before comment text; expected "// $item is sorted using section name for display." but found "//$item is sorted using section name for display."
(#71) Short array syntax must be used to define arrays
(#72) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#73) Expected "if (...) {\n"; found "if (...){\n"
(#76) Expected "if (...) {\n"; found "if (...){\n"
(#77) Expected "if (...) {\n"; found "if (...){\n"
(#78) Expected 1 space before "="; 0 found
(#78) Expected 1 space after "="; 0 found
(#79) Expected "} else {\n"; found "}else{\n"
(#80) Expected 1 space before "="; 0 found
(#80) Expected 1 space after "="; 0 found
(#80) Whitespace found at end of line
(#82) Expected "} else {\n"; found "}else{\n"
(#83) Expected 1 space before "="; 0 found
(#83) Expected 1 space after "="; 0 found
(#85) Inline comments must end in full-stops, exclamation marks, or question marks
(#86) Expected "if (...) {\n"; found "if (...){\n"
(#87) Expected "if (...) {\n"; found "if (...){\n"
(#88) Short array syntax must be used to define arrays
(#89) Commas (,) must be followed by white space.
(#90) Short array syntax must be used to define arrays
(#91) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#92) Expected "if (...) {\n"; found "if (...){\n"
(#96) Expected "if (...) {\n"; found "if (...){\n"
(#97) Inline comments must end in full-stops, exclamation marks, or question marks
(#99) Expected "} else {\n"; found "}else{\n"
(#102) Expected "} else {\n"; found "}else{\n"
(#103) Expected "if (...) {\n"; found "if (...){\n"
(#104) Expected 1 space before "="; 0 found
(#104) Expected 1 space after "="; 0 found
(#105) Expected "} else {\n"; found "}else{\n"
(#109) Expected "} else {\n"; found "}else{\n"
(#114) Short array syntax must be used to define arrays
(#115) Inline comments must end in full-stops, exclamation marks, or question marks
(#115) No space found before comment text; expected "// Retrieve scratchpad modules in the course, remove deleted/hiddden and order by" but found "//Retrieve scratchpad modules in the course, remove deleted/hiddden and order by"
(#116) Short array syntax must be used to define arrays
(#117) Short array syntax must be used to define arrays
(#117) Whitespace found at end of line
(#118) Short array syntax must be used to define arrays
(#119) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#120) Expected "if (...) {\n"; found "if (...){\n"
(#122) Expected "} else {\n"; found "}else{\n"
(#128) Short array syntax must be used to define arrays
(#129) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#130) Expected "if (...) {\n"; found "if (...){\n"
(#138) TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
(#145) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#147) Variable "section_count" must not contain underscores.
(#149) Expected "foreach (...) {\n"; found "foreach (...){\n"
(#150) Variable "section_count" must not contain underscores.
(#152) Expected "if (...) {\n"; found "if (...){\n"
(#159) Whitespace found at end of line
(#160) Short array syntax must be used to define arrays
(#162) This comment is 67% valid code; is this commented out code?
(#162) Perl-style comments are not allowed; use "// Comment." instead
(#164) Whitespace found at end of line
(#165) Expected "if (...) {\n"; found "if (...){\n"
(#166) Expected "if (...) {\n"; found "if (...){\n"
(#166) Variable "section_count" must not contain underscores.
(#167) Whitespace found at end of line
(#170) Expected 1 space after ".="; 0 found
(#174) Inline comments must start with a capital letter, digit or 3-dots sequence
(#174) Inline comments must end in full-stops, exclamation marks, or question marks
(#177) File must end with a newline character
mod/scratchpad/edit.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#32) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#35) Short array syntax must be used to define arrays
(#36) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#45) Short array syntax must be used to define arrays
(#46) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#48) Expected "if (...) {\n"; found "if (...){\n"
(#49) Variable "prev_scratchpad" must not contain underscores.
(#49) Short array syntax must be used to define arrays
(#50) Variable "prev_entry" must not contain underscores.
(#50) Short array syntax must be used to define arrays
(#53) Short array syntax must be used to define arrays
(#60) Short array syntax must be used to define arrays
(#73) Short array syntax must be used to define arrays
(#77) There should be a comma after the last array item in a multi-line array.
(#80) This comment is 66% valid code; is this commented out code?
(#80) Perl-style comments are not allowed; use "// Comment." instead
(#82) Short array syntax must be used to define arrays
(#83) This comment is 86% valid code; is this commented out code?
(#83) Perl-style comments are not allowed; use "// Comment." instead
(#102) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#108) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#121) Inline comments must end in full-stops, exclamation marks, or question marks
(#121) Expected 1 space before comment text but found 5; use block comment if you need indentation
(#129) Short array syntax must be used to define arrays
(#131) There should be a comma after the last array item in a multi-line array.
(#135) Short array syntax must be used to define arrays
(#137) There should be a comma after the last array item in a multi-line array.
(#148) Expected "} else {\n"; found "} else{\n"
(#156) Expected "if (...) {\n"; found "if(...){\n"
(#156) Variable "prev_scratchpad" must not contain underscores.
(#157) Variable "prev_intro" must not contain underscores.
(#157) Variable "prev_scratchpad" must not contain underscores.
(#159) Expected "if (...) {\n"; found "if (...){\n"
(#159) Variable "prev_intro" must not contain underscores.
(#161) Variable "prev_intro" must not contain underscores.
(#162) Whitespace found at end of line
(#163) Expected "if (...) {\n"; found "if (...){\n"
(#163) Variable "prev_entry" must not contain underscores.
(#164) Variable "prev_entry" must not contain underscores.
mod/scratchpad/edit_form.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#33) Inline comments must start with a capital letter, digit or 3-dots sequence
(#33) This comment is 66% valid code; is this commented out code?
(#34) Expected 1 space before comment text but found 9; use block comment if you need indentation
(#37) Line exceeds 132 characters; contains 137 characters
(#45) Visibility must be declared on method "validation"
(#46) Short array syntax must be used to define arrays
mod/scratchpad/externallib.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#34) Short array syntax must be used to define arrays
(#35) There should be a comma after the last array item in a multi-line array.
(#42) Short array syntax must be used to define arrays
(#47) There should be a comma after the last array item in a multi-line array.
(#55) Short array syntax must be used to define arrays
(#61) Short array syntax must be used to define arrays
(#65) Short array syntax must be used to define arrays
(#73) Short array syntax must be used to define arrays
(#74) Short array syntax must be used to define arrays
(#79) There should be a comma after the last array item in a multi-line array.
(#89) Short array syntax must be used to define arrays
(#92) There should be a comma after the last array item in a multi-line array.
(#106) Short array syntax must be used to define arrays
(#113) Short array syntax must be used to define arrays
(#117) Short array syntax must be used to define arrays
(#125) Short array syntax must be used to define arrays
(#144) Short array syntax must be used to define arrays
(#146) There should be a comma after the last array item in a multi-line array.
(#150) Short array syntax must be used to define arrays
(#152) There should be a comma after the last array item in a multi-line array.
(#163) File must end with a newline character
mod/scratchpad/index.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#32) Short array syntax must be used to define arrays
(#33) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#42) Short array syntax must be used to define arrays
(#51) Line exceeds 132 characters; contains 133 characters
(#68) Short array syntax must be used to define arrays
(#69) Short array syntax must be used to define arrays
(#104) Short array syntax must be used to define arrays
(#114) Short array syntax must be used to define arrays
(#149) Short array syntax must be used to define arrays
(#150) There should be a comma after the last array item in a multi-line array.
mod/scratchpad/lang/en/scratchpad.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#61) Whitespace found at end of line within string
(#62) Whitespace found at end of line within string
(#63) Whitespace found at end of line within string
(#64) Whitespace found at end of line within string
(#65) Whitespace found at end of line within string
(#67) Whitespace found at end of line within string
(#68) Whitespace found at end of line within string
(#74) Whitespace found at end of line within string
mod/scratchpad/lib.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#83) Short array syntax must be used to define arrays
(#87) Short array syntax must be used to define arrays
(#91) Short array syntax must be used to define arrays
(#128) Short array syntax must be used to define arrays
(#133) Short array syntax must be used to define arrays
(#141) Short array syntax must be used to define arrays
(#158) Short array syntax must be used to define arrays
(#187) Whitespace found at end of line
(#198) Short array syntax must be used to define arrays
(#199) Short array syntax must be used to define arrays
(#208) Short array syntax must be used to define arrays
(#220) Short array syntax must be used to define arrays
(#230) Short array syntax must be used to define arrays
(#250) Logical operator "and" is prohibited; use "&&" instead
(#270) Line exceeds 132 characters; contains 133 characters
(#281) Short array syntax must be used to define arrays
(#309) Short array syntax must be used to define arrays
(#311) Whitespace found at end of line within string
(#312) Whitespace found at end of line within string
(#313) Whitespace found at end of line within string
(#314) Whitespace found at end of line within string
(#315) Whitespace found at end of line within string
(#316) Whitespace found at end of line within string
(#317) Whitespace found at end of line within string
(#318) Whitespace found at end of line within string
(#319) Whitespace found at end of line within string
(#320) Whitespace found at end of line within string
(#326) Short array syntax must be used to define arrays
(#408) Whitespace found at end of line within string
(#409) Whitespace found at end of line within string
(#410) Whitespace found at end of line within string
(#411) Whitespace found at end of line within string
(#412) Short array syntax must be used to define arrays
(#414) Whitespace found at end of line within string
(#415) Whitespace found at end of line within string
(#416) Whitespace found at end of line within string
(#417) Whitespace found at end of line within string
(#418) Short array syntax must be used to define arrays
(#441) Short array syntax must be used to define arrays
(#460) Logical operator "and" is prohibited; use "&&" instead
(#460) Short array syntax must be used to define arrays
(#485) Short array syntax must be used to define arrays
(#497) Short array syntax must be used to define arrays
(#500) Whitespace found at end of line within string
(#501) Whitespace found at end of line within string
(#503) Short array syntax must be used to define arrays
(#507) Short array syntax must be used to define arrays
(#520) Short array syntax must be used to define arrays
(#524) Short array syntax must be used to define arrays
(#528) Short array syntax must be used to define arrays
(#537) Short array syntax must be used to define arrays
(#540) Logical operator "and" is prohibited; use "&&" instead
(#574) Short array syntax must be used to define arrays
(#588) Whitespace found at end of line within string
(#589) Whitespace found at end of line within string
(#590) Whitespace found at end of line within string
(#640) Whitespace found at end of line within string
(#641) Whitespace found at end of line within string
(#642) Whitespace found at end of line within string
(#643) Whitespace found at end of line within string
(#672) Short array syntax must be used to define arrays
(#674) Short array syntax must be used to define arrays
(#677) Inline comments must start with a capital letter, digit or 3-dots sequence
(#677) This comment is 57% valid code; is this commented out code?
(#681) Inline comments must end in full-stops, exclamation marks, or question marks
(#683) Inline comments must start with a capital letter, digit or 3-dots sequence
(#683) This comment is 54% valid code; is this commented out code?
(#687) Inline comments must start with a capital letter, digit or 3-dots sequence
(#687) This comment is 54% valid code; is this commented out code?
(#712) Short array syntax must be used to define arrays
(#712) Line exceeds 132 characters; contains 133 characters
(#720) Short array syntax must be used to define arrays
(#722) Whitespace found at end of line within string
(#748) Logical operator "and" is prohibited; use "&&" instead
(#767) Whitespace found at end of line within string
(#768) Whitespace found at end of line within string
(#769) Whitespace found at end of line within string
(#771) Short array syntax must be used to define arrays
(#775) Whitespace found at end of line within string
(#776) Whitespace found at end of line within string
(#778) Short array syntax must be used to define arrays
(#802) Whitespace found at end of line within string
(#803) Whitespace found at end of line within string
(#805) Short array syntax must be used to define arrays
(#811) Whitespace found at end of line within string
(#812) Whitespace found at end of line within string
(#813) Whitespace found at end of line within string
(#814) Whitespace found at end of line within string
(#816) Short array syntax must be used to define arrays
(#829) Whitespace found at end of line within string
(#830) Whitespace found at end of line within string
(#831) Short array syntax must be used to define arrays
(#846) Short array syntax must be used to define arrays
(#870) Short array syntax must be used to define arrays
(#872) Short array syntax must be used to define arrays
(#876) Short array syntax must be used to define arrays
(#883) Short array syntax must be used to define arrays
(#900) Short array syntax must be used to define arrays
(#912) Short array syntax must be used to define arrays
(#932) Short array syntax must be used to define arrays
(#933) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#940) Short array syntax must be used to define arrays
(#955) Short array syntax must be used to define arrays
(#983) Short array syntax must be used to define arrays
(#998) Short array syntax must be used to define arrays
(#1038) Short array syntax must be used to define arrays
(#1041) There should be a comma after the last array item in a multi-line array.
(#1047) Expected 1 space before asterisk; 2 found
(#1048) Expected 1 space before asterisk; 2 found
(#1049) Expected 1 space before asterisk; 2 found
(#1050) Expected 1 space before asterisk; 2 found
(#1051) Expected 1 space before asterisk; 2 found
(#1052) Expected 1 space before asterisk; 2 found
(#1053) Expected 1 space before asterisk; 2 found
(#1054) Expected 1 space before asterisk; 2 found
(#1055) Expected 1 space before asterisk; 2 found
(#1056) Commas (,) must be followed by white space.
(#1056) Commas (,) must be followed by white space.
(#1056) Commas (,) must be followed by white space.
(#1057) Commas (,) must be followed by white space.
(#1059) Inline comments must end in full-stops, exclamation marks, or question marks
(#1060) Short array syntax must be used to define arrays
(#1062) Inline comments must end in full-stops, exclamation marks, or question marks
(#1062) Whitespace found at end of line
(#1063) Expected "if (...) {\n"; found "if(...) {\n"
(#1064) Whitespace found at end of line within string
(#1065) Whitespace found at end of line within string
(#1066) Whitespace found at end of line within string
(#1067) Whitespace found at end of line within string
(#1068) Whitespace found at end of line within string
(#1069) Whitespace found at end of line within string
(#1070) Whitespace found at end of line within string
(#1072) Short array syntax must be used to define arrays
(#1072) Expected 1 space before "=>"; 0 found
(#1072) Expected 1 space after "=>"; 0 found
(#1072) Commas (,) must be followed by white space.
(#1072) Expected 1 space before "=>"; 0 found
(#1072) Expected 1 space after "=>"; 0 found
(#1074) Inline comments must end in full-stops, exclamation marks, or question marks
mod/scratchpad/mod_form.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#34) Whitespace found at end of line
(#39) Short array syntax must be used to define arrays
(#45) Inline comments must start with a capital letter, digit or 3-dots sequence
(#45) This comment is 58% valid code; is this commented out code?
(#61) Whitespace found at end of line
(#62) Short array syntax must be used to define arrays
(#63) Variable "current_id" must not contain underscores.
(#66) Short array syntax must be used to define arrays
(#68) Expected "foreach (...) {\n"; found "foreach(...){\n"
(#72) Inline comments must end in full-stops, exclamation marks, or question marks
(#73) Expected "if (...) {\n"; found "if (...){\n"
(#73) Variable "current_id" must not contain underscores.
(#74) Variable "current_id" must not contain underscores.
(#77) Expected "if (...) {\n"; found "if (...){\n"
(#81) Inline comments must start with a capital letter, digit or 3-dots sequence
(#81) This comment is 84% valid code; is this commented out code?
(#83) Short array syntax must be used to define arrays
(#87) Whitespace found at end of line
(#93) Visibility must be declared on method "data_preprocessing"
(#93) Variable "default_values" must not contain underscores.
(#94) Variable "default_values" must not contain underscores.
(#99) Variable "default_values" must not contain underscores.
(#99) Expected 1 space before "="; 0 found
(#100) Variable "default_values" must not contain underscores.
(#101) Variable "default_values" must not contain underscores.
(#102) Variable "default_values" must not contain underscores.
(#102) Expected 1 space before "="; 0 found
(#102) Expected 1 space after "="; 0 found
(#105) Variable "default_values" must not contain underscores.
(#106) Variable "default_values" must not contain underscores.
(#108) Variable "default_values" must not contain underscores.
(#110) Variable "default_values" must not contain underscores.
(#111) Variable "default_values" must not contain underscores.
(#111) Expected 1 space before "="; 0 found
(#111) Expected 1 space after "="; 0 found
(#123) Expected 1 space before "="; 0 found
(#123) Expected 1 space after "="; 0 found
(#123) Short array syntax must be used to define arrays
(#124) Commas (,) must be followed by white space.
(#125) Inline comments must start with a capital letter, digit or 3-dots sequence
(#125) This comment is 78% valid code; is this commented out code?
(#126) Commas (,) must be followed by white space.
(#127) Commas (,) must be followed by white space.
(#127) Short array syntax must be used to define arrays
(#128) Inline comments must start with a capital letter, digit or 3-dots sequence
(#128) This comment is 77% valid code; is this commented out code?
(#129) Commas (,) must be followed by white space.
(#129) Commas (,) must be followed by white space.
(#131) Short array syntax must be used to define arrays
(#134) Visibility must be declared on method "completion_rule_enabled"
(#135) Expected 1 space before "!="; 0 found
(#135) Expected 1 space after "!="; 0 found
(#146) Visibility must be declared on method "get_data"
(#152) Inline comments must end in full-stops, exclamation marks, or question marks
(#153) Expected 1 space before "=="; 0 found
(#153) Expected 1 space after "=="; 0 found
(#155) Line indented incorrectly; expected at least 16 spaces, found 15
(#156) Expected "} else {\n"; found "}else{\n"
(#157) Line indented incorrectly; expected at least 16 spaces, found 15
(#173) Inline comments must end in full-stops, exclamation marks, or question marks
(#175) Expected 1 space before "=="; 0 found
(#175) Expected 1 space after "=="; 0 found
(#177) Line indented incorrectly; expected at least 16 spaces, found 15
(#178) Expected "} else {\n"; found "}else{\n"
(#179) Line indented incorrectly; expected at least 16 spaces, found 15
mod/scratchpad/report.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#33) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#36) Short array syntax must be used to define arrays
(#37) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#47) Short array syntax must be used to define arrays
(#48) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#52) Short array syntax must be used to define arrays
(#63) Short array syntax must be used to define arrays
(#70) Short array syntax must be used to define arrays
(#71) Short array syntax must be used to define arrays
(#84) Short array syntax must be used to define arrays
(#132) Short array syntax must be used to define arrays
(#140) Short array syntax must be used to define arrays
(#142) There should be a comma after the last array item in a multi-line array.
(#154) Short array syntax must be used to define arrays
(#156) There should be a comma after the last array item in a multi-line array.
(#182) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
mod/scratchpad/settings.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#32) Short array syntax must be used to define arrays
(#36) Short array syntax must be used to define arrays
mod/scratchpad/tests/generator/lib.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
mod/scratchpad/version.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
mod/scratchpad/view.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#33) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#36) Short array syntax must be used to define arrays
(#37) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#51) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#54) Short array syntax must be used to define arrays
(#55) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#57) Expected "if (...) {\n"; found "if (...){\n"
(#58) Variable "prev_scratchpad" must not contain underscores.
(#58) Short array syntax must be used to define arrays
(#61) Short array syntax must be used to define arrays
(#62) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#65) Short array syntax must be used to define arrays
(#68) Short array syntax must be used to define arrays
(#79) Inline comments must start with a capital letter, digit or 3-dots sequence
(#79) Inline comments must end in full-stops, exclamation marks, or question marks
(#79) This comment is 58% valid code; is this commented out code?
(#81) Inline comments must start with a capital letter, digit or 3-dots sequence
(#81) This comment is 55% valid code; is this commented out code?
(#85) Inline comments must end in full-stops, exclamation marks, or question marks
(#87) Inline comments must end in full-stops, exclamation marks, or question marks
(#87) No space found before comment text; expected "// Check download mode, and display the download page button" but found "//Check download mode, and display the download page button"
(#88) Expected "if (...) {\n"; found "if (...){\n"
(#89) Inline comments must start with a capital letter, digit or 3-dots sequence
(#89) Inline comments must end in full-stops, exclamation marks, or question marks
(#89) This comment is 70% valid code; is this commented out code?
(#96) Short array syntax must be used to define arrays
(#101) Expected "if (...) {\n"; found "if (...){\n"
(#101) Variable "prev_scratchpad" must not contain underscores.
(#104) Variable "prev_scratchpad" must not contain underscores.
(#104) Variable "prev_scratchpad" must not contain underscores.
(#105) Variable "prev_scratchpad" must not contain underscores.
(#106) Variable "prev_scratchpad" must not contain underscores.
(#107) Short array syntax must be used to define arrays
(#107) Expected 1 space before "=>"; 0 found
(#107) Expected 1 space after "=>"; 0 found
(#107) Line exceeds 132 characters; contains 171 characters
(#110) Inline comments must start with a capital letter, digit or 3-dots sequence
(#110) Inline comments must end in full-stops, exclamation marks, or question marks
(#110) This comment is 75% valid code; is this commented out code?
(#112) Logical operator "and" is prohibited; use "&&" instead
(#112) Variable "prev_scratchpad" must not contain underscores.
(#113) Line indented incorrectly; expected at least 8 spaces, found 4
(#114) Line indented incorrectly; expected 8 spaces, found 4
(#114) Variable "prev_scratchpad" must not contain underscores.
(#115) Line indented incorrectly; expected at least 12 spaces, found 8
(#116) Line indented incorrectly; expected 8 spaces, found 4
(#117) Line indented incorrectly; expected at least 12 spaces, found 8
(#118) Line indented incorrectly; expected 8 spaces, found 4
(#121) Line indented incorrectly; expected at least 8 spaces, found 4
(#122) Line indented incorrectly; expected at least 8 spaces, found 4
(#123) Line indented incorrectly; expected at least 8 spaces, found 4
(#123) Variable "prev_scratchpad" must not contain underscores.
(#127) Inline comments must start with a capital letter, digit or 3-dots sequence
(#127) Inline comments must end in full-stops, exclamation marks, or question marks
(#127) This comment is 75% valid code; is this commented out code?
(#127) Line indented incorrectly; expected at least 8 spaces, found 4
(#129) Line indented incorrectly; expected at least 8 spaces, found 4
(#130) Line indented incorrectly; expected 8 spaces, found 4
(#130) Variable "prev_entry" must not contain underscores.
(#130) Short array syntax must be used to define arrays
(#130) Variable "prev_scratchpad" must not contain underscores.
(#131) Line indented incorrectly; expected 12 spaces, found 8
(#131) Variable "prev_entry" must not contain underscores.
(#132) Line indented incorrectly; expected at least 16 spaces, found 12
(#133) Line indented incorrectly; expected 12 spaces, found 8
(#134) Inline comments must start with a capital letter, digit or 3-dots sequence
(#134) Inline comments must end in full-stops, exclamation marks, or question marks
(#134) This comment is 62% valid code; is this commented out code?
(#134) Line indented incorrectly; expected at least 16 spaces, found 12
(#135) Line indented incorrectly; expected at least 16 spaces, found 12
(#135) Short array syntax must be used to define arrays
(#135) Expected 1 space before "=>"; 0 found
(#135) Expected 1 space after "=>"; 0 found
(#135) Variable "prev_entry" must not contain underscores.
(#135) Line exceeds maximum limit of 180 characters; contains 224 characters
(#136) Line indented incorrectly; expected 12 spaces, found 8
(#137) Line indented incorrectly; expected 8 spaces, found 4
(#138) Line indented incorrectly; expected at least 12 spaces, found 8
(#139) Line indented incorrectly; expected 8 spaces, found 4
(#141) Inline comments must start with a capital letter, digit or 3-dots sequence
(#141) Inline comments must end in full-stops, exclamation marks, or question marks
(#141) This comment is 75% valid code; is this commented out code?
(#141) Line indented incorrectly; expected at least 8 spaces, found 4
(#143) Line indented incorrectly; expected at least 8 spaces, found 4
(#144) Inline comments must end in full-stops, exclamation marks, or question marks
(#144) Line indented incorrectly; expected at least 8 spaces, found 4
(#146) Inline comments must start with a capital letter, digit or 3-dots sequence
(#146) This comment is 61% valid code; is this commented out code?
(#150) Inline comments must end in full-stops, exclamation marks, or question marks
(#150) Line indented incorrectly; expected at least 8 spaces, found 4
(#152) Inline comments must start with a capital letter, digit or 3-dots sequence
(#152) Inline comments must end in full-stops, exclamation marks, or question marks
(#152) This comment is 75% valid code; is this commented out code?
(#152) Line indented incorrectly; expected at least 8 spaces, found 4
(#154) Line indented incorrectly; expected at least 8 spaces, found 4
(#155) Line indented incorrectly; expected 8 spaces, found 4
(#156) Line indented incorrectly; expected 12 spaces, found 8
(#156) Variable "prev_entry" must not contain underscores.
(#157) Line indented incorrectly; expected at least 16 spaces, found 12
(#158) Line indented incorrectly; expected at least 16 spaces, found 12
(#158) Variable "prev_entry" must not contain underscores.
(#159) Inline comments must start with a capital letter, digit or 3-dots sequence
(#159) Inline comments must end in full-stops, exclamation marks, or question marks
(#159) This comment is 64% valid code; is this commented out code?
(#159) Line indented incorrectly; expected at least 16 spaces, found 12
(#160) Line indented incorrectly; expected at least 16 spaces, found 12
(#161) Line indented incorrectly; expected 12 spaces, found 8
(#162) Line indented incorrectly; expected at least 12 spaces, found 8
(#163) Line indented incorrectly; expected 12 spaces, found 8
(#163) Variable "prev_entry" must not contain underscores.
(#163) Logical operator "and" is prohibited; use "&&" instead
(#163) Variable "prev_entry" must not contain underscores.
(#163) Logical operator "and" is prohibited; use "&&" instead
(#163) Variable "prev_entry" must not contain underscores.
(#163) Variable "prev_entry" must not contain underscores.
(#164) Line indented incorrectly; expected at least 16 spaces, found 12
(#165) Line indented incorrectly; expected 12 spaces, found 8
(#167) Line indented incorrectly; expected 12 spaces, found 8
(#167) Variable "prev_scratchpad" must not contain underscores.
(#168) Line indented incorrectly; expected at least 16 spaces, found 12
(#169) Line indented incorrectly; expected at least 16 spaces, found 12
(#170) Line indented incorrectly; expected 12 spaces, found 8
(#172) Line indented incorrectly; expected 8 spaces, found 4
(#173) Line indented incorrectly; expected at least 12 spaces, found 8
(#174) Line indented incorrectly; expected at least 12 spaces, found 8
(#175) Line indented incorrectly; expected 8 spaces, found 4
(#177) Line indented incorrectly; expected at least 8 spaces, found 4
(#178) Line indented incorrectly; expected 8 spaces, found 4
(#178) Variable "prev_entry" must not contain underscores.
(#178) Logical operator "or" is prohibited; use "||" instead
(#178) Variable "prev_entry" must not contain underscores.
(#179) Line indented incorrectly; expected at least 12 spaces, found 8
(#179) Variable "prev_scratchpad" must not contain underscores.
(#180) Line indented incorrectly; expected at least 12 spaces, found 8
(#181) Line indented incorrectly; expected at least 12 spaces, found 8
(#181) Variable "prev_entry" must not contain underscores.
(#182) Line indented incorrectly; expected 8 spaces, found 4
(#185) Line indented incorrectly; expected at least 8 spaces, found 4
(#186) Line indented incorrectly; expected at least 8 spaces, found 4
(#190) Line indented incorrectly; expected at least 4 spaces, found 0
(#196) Short array syntax must be used to define arrays
(#196) Expected 1 space before "=>"; 0 found
(#196) Expected 1 space after "=>"; 0 found
(#196) Line exceeds 132 characters; contains 167 characters
(#199) Inline comments must start with a capital letter, digit or 3-dots sequence
(#199) Inline comments must end in full-stops, exclamation marks, or question marks
(#199) This comment is 75% valid code; is this commented out code?
(#202) Logical operator "and" is prohibited; use "&&" instead
(#217) Inline comments must start with a capital letter, digit or 3-dots sequence
(#217) Inline comments must end in full-stops, exclamation marks, or question marks
(#217) This comment is 75% valid code; is this commented out code?
(#220) Short array syntax must be used to define arrays
(#224) Inline comments must start with a capital letter, digit or 3-dots sequence
(#224) Inline comments must end in full-stops, exclamation marks, or question marks
(#224) This comment is 62% valid code; is this commented out code?
(#225) Short array syntax must be used to define arrays
(#225) Expected 1 space before "=>"; 0 found
(#225) Expected 1 space after "=>"; 0 found
(#225) Line exceeds maximum limit of 180 characters; contains 248 characters
(#230) Whitespace found at end of line
(#231) Inline comments must start with a capital letter, digit or 3-dots sequence
(#231) Inline comments must end in full-stops, exclamation marks, or question marks
(#231) This comment is 75% valid code; is this commented out code?
(#232) Whitespace found at end of line
(#235) Whitespace found at end of line
(#238) Short array syntax must be used to define arrays
(#242) Inline comments must start with a capital letter, digit or 3-dots sequence
(#242) Inline comments must end in full-stops, exclamation marks, or question marks
(#242) This comment is 75% valid code; is this commented out code?
(#249) Inline comments must start with a capital letter, digit or 3-dots sequence
(#249) Inline comments must end in full-stops, exclamation marks, or question marks
(#249) This comment is 64% valid code; is this commented out code?
(#253) Logical operator "and" is prohibited; use "&&" instead
(#253) Logical operator "and" is prohibited; use "&&" instead
(#268) Logical operator "or" is prohibited; use "||" instead
(#281) Short array syntax must be used to define arrays
(#283) There should be a comma after the last array item in a multi-line array.

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

(9 errors, 0 warnings)

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

mod/scratchpad/styles.css
(#83) Expected newline after "," (selector-list-comma-newline-after)
(#83) Expected newline after "," (selector-list-comma-newline-after)
(#86) Expected newline after "," (selector-list-comma-newline-after)
(#86) Expected newline after "," (selector-list-comma-newline-after)
(#21) Expected indentation of 0 spaces (indentation)
(#22) Expected indentation of 0 spaces (indentation)
(#23) Expected indentation of 0 spaces (indentation)
(#77) Expected indentation of 0 spaces (indentation)
(#78) Expected indentation of 0 spaces (indentation)

PHPDocs style problems

(26 errors, 28 warnings)

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

mod/scratchpad/backup/moodle2/backup_scratchpad_activity_task.class.php
(#30) Class backup_scratchpad_activity_task is not documented
(#32) Function backup_scratchpad_activity_task::define_my_settings is not documented
(#35) Function backup_scratchpad_activity_task::define_my_steps is not documented
(#39) Function backup_scratchpad_activity_task::encode_content_links is not documented
mod/scratchpad/backup/moodle2/backup_scratchpad_stepslib.php
(#28) Class backup_scratchpad_activity_structure_step is not documented
(#30) Function backup_scratchpad_activity_structure_step::define_structure is not documented
mod/scratchpad/backup/moodle2/restore_scratchpad_activity_task.class.php
(#30) Class restore_scratchpad_activity_task is not documented
(#32) Function restore_scratchpad_activity_task::define_my_settings is not documented
(#35) Function restore_scratchpad_activity_task::define_my_steps is not documented
(#39) Function restore_scratchpad_activity_task::define_decode_contents is not documented
(#48) Function restore_scratchpad_activity_task::define_decode_rules is not documented
(#60) Function restore_scratchpad_activity_task::define_restore_log_rules is not documented
(#72) Function restore_scratchpad_activity_task::define_restore_log_rules_for_course is not documented
mod/scratchpad/backup/moodle2/restore_scratchpad_stepslib.php
(#28) Class restore_scratchpad_activity_structure_step is not documented
(#30) Function restore_scratchpad_activity_structure_step::define_structure is not documented
(#42) Function restore_scratchpad_activity_structure_step::process_scratchpad is not documented
(#58) Function restore_scratchpad_activity_structure_step::process_scratchpad_entry is not documented
(#77) Function restore_scratchpad_activity_structure_step::after_execute is not documented
mod/scratchpad/classes/privacy/provider.php
(#44) Class provider is not documented
mod/scratchpad/db/upgrade.php
(#30) Function xmldb_scratchpad_upgrade is not documented
mod/scratchpad/edit_form.php
(#30) Class mod_scratchpad_entry_form is not documented
(#32) Function mod_scratchpad_entry_form::definition is not documented
(#45) Function mod_scratchpad_entry_form::validation is not documented
mod/scratchpad/externallib.php
(#30) Class mod_scratchpad_external is not documented
(#32) Function mod_scratchpad_external::get_entry_parameters is not documented
(#40) Function mod_scratchpad_external::get_entry_returns is not documented
(#52) Function mod_scratchpad_external::get_entry is not documented
(#87) Function mod_scratchpad_external::set_text_parameters is not documented
(#97) Function mod_scratchpad_external::set_text_returns is not documented
(#101) Function mod_scratchpad_external::set_text is not documented
mod/scratchpad/lib.php
(#99) Function scratchpad_supports is not documented
(#127) Function scratchpad_get_view_actions is not documented
(#132) Function scratchpad_get_post_actions is not documented
(#137) Function scratchpad_user_outline is not documented
(#154) Function scratchpad_user_complete is not documented
(#515) Function scratchpad_print_overview is not documented
(#571) Function scratchpad_get_user_grades is not documented
(#717) Function scratchpad_get_users_done is not documented
(#799) Function scratchpad_get_unmailed_graded is not documented
(#808) Function scratchpad_log_info is not documented
(#836) Function scratchpad_print_user_entry is not documented
(#926) Function scratchpad_print_feedback is not documented
(#1024) Function scratchpad_format_entry_text is not documented
(#454) Phpdocs for function scratchpad_scale_used_anywhere has incomplete parameters list
(#661) Phpdocs for function scratchpad_grade_item_update has incomplete parameters list
(#756) Phpdocs for function scratchpad_count_entries has incomplete parameters list
(#822) Phpdocs for function scratchpad_get_coursemodule has incomplete parameters list
(#295) Not recommended phpdocs tag @global used
(#295) Not recommended phpdocs tag @global used
mod/scratchpad/mod_form.php
(#30) Class mod_scratchpad_mod_form is not documented
(#32) Function mod_scratchpad_mod_form::definition is not documented
(#93) Function mod_scratchpad_mod_form::data_preprocessing is not documented
(#134) Function mod_scratchpad_mod_form::completion_rule_enabled is not documented
mod/scratchpad/tests/generator/lib.php
(#54) Function mod_scratchpad_generator::create_instance is not documented

Update savepoints problems

(2 errors, 0 warnings)

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

mod/scratchpad/db/upgrade.php
Detected more 'if' blocks (1) than 'savepoint' calls (0)
version 2021113007 is missing corresponding savepoint call

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 "stylelint:css" 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, 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]