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

(65 errors, 69 warnings)

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

local/downloadcenter/classes/event/plugin_viewed.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#11) Inline comments must start with a capital letter, digit or 3-dots sequence
(#11) Inline comments must end in full-stops, exclamation marks, or question marks
(#11) This comment is 48% valid code; is this commented out code?
local/downloadcenter/classes/event/zip_downloaded.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#11) Inline comments must start with a capital letter, digit or 3-dots sequence
(#11) Inline comments must end in full-stops, exclamation marks, or question marks
(#11) This comment is 48% valid code; is this commented out code?
(#21) Line exceeds 132 characters; contains 136 characters
local/downloadcenter/download_form.php
(#37) Inline comments must start with a capital letter, digit or 3-dots sequence
(#37) Inline comments must end in full-stops, exclamation marks, or question marks
(#37) This comment is 67% valid code; is this commented out code?
(#37) No space found before comment text; expected "// $this->class" but found "//$this->class"
(#41) Line exceeds 132 characters; contains 150 characters
(#42) Inline comments must start with a capital letter, digit or 3-dots sequence
(#42) No space found before comment text; expected "// hack to work around fieldsets.." but found "//hack to work around fieldsets.."
local/downloadcenter/index.php
(#58) This comment is 75% valid code; is this commented out code?
(#58) Inline comments must start with a capital letter, digit or 3-dots sequence
(#58) No space found before comment text; expected "// echo $OUTPUT->header();" but found "//echo $OUTPUT->header();"
(#59) This comment is 69% valid code; is this commented out code?
(#59) No space found before comment text; expected "// echo html_writer::start_div('', array('id' => 'executionprogress'));" but found "//echo html_writer::start_div('', array('id' => 'executionprogress'));"
(#60) Inline comments must end in full-stops, exclamation marks, or question marks
(#60) This comment is 74% valid code; is this commented out code?
(#60) No space found before comment text; expected "// echo $OUTPUT->heading(get_string('zipcreating', 'local_downloadcenter'));" but found "//echo $OUTPUT->heading(get_string('zipcreating', 'local_downloadcenter'));"
(#73) Inline comments must start with a capital letter, digit or 3-dots sequence
(#73) No space found before comment text; expected "// $info = new stdClass;" but found "//$info = new stdClass;"
(#74) This comment is 50% valid code; is this commented out code?
(#74) No space found before comment text; expected "// $info->filehash = $hash;" but found "//$info->filehash = $hash;"
(#75) This comment is 86% valid code; is this commented out code?
(#75) No space found before comment text; expected "// $downloadfinalform->set_data($info);" but found "//$downloadfinalform->set_data($info);"
(#76) Inline comments must end in full-stops, exclamation marks, or question marks
(#76) This comment is 50% valid code; is this commented out code?
(#76) No space found before comment text; expected "// $downloadform = $downloadfinalform;" but found "//$downloadform = $downloadfinalform;"
(#78) This comment is 63% valid code; is this commented out code?
(#78) Inline comments must start with a capital letter, digit or 3-dots sequence
(#78) No space found before comment text; expected "// echo html_writer::end_div();" but found "//echo html_writer::end_div();"
(#79) This comment is 67% valid code; is this commented out code?
(#79) No space found before comment text; expected "// echo html_writer::script('document.getElementById("executionprogress").style.display = "none";');" but found "//echo html_writer::script('document.getElementById("executionprogress").style.display = "none";');"
(#80) Inline comments must end in full-stops, exclamation marks, or question marks
(#80) This comment is 73% valid code; is this commented out code?
(#80) No space found before comment text; expected "// echo $OUTPUT->notification(get_string('zipready', 'local_downloadcenter'), 'notifysuccess');" but found "//echo $OUTPUT->notification(get_string('zipready', 'local_downloadcenter'), 'notifysuccess');"
(#85) This comment is 63% valid code; is this commented out code?
(#85) Line indented incorrectly; expected at least 4 spaces, found 0
local/downloadcenter/lib.php
(#29) Variable "settings_nav" must not contain underscores.
(#32) Inline comments must start with a capital letter, digit or 3-dots sequence
(#32) Inline comments must end in full-stops, exclamation marks, or question marks
(#32) No space found before comment text; expected "// not used anymore" but found "//not used anymore"
(#43) Variable "settings_nav" must not contain underscores.
(#45) Variable "settings_nav" must not contain underscores.
(#48) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#51) Functions must not contain multiple empty lines in a row; found 3 empty lines
(#64) Inline comments must start with a capital letter, digit or 3-dots sequence
(#64) Inline comments must end in full-stops, exclamation marks, or question marks
(#64) This comment is 50% valid code; is this commented out code?
(#64) No space found before comment text; expected "// navigation_node::TYPE_SITE_ADMIN," but found "//navigation_node::TYPE_SITE_ADMIN,"
(#69) Variable "settings_nav" must not contain underscores.
(#70) Inline comments must start with a capital letter, digit or 3-dots sequence
(#70) Inline comments must end in full-stops, exclamation marks, or question marks
(#70) This comment is 50% valid code; is this commented out code?
(#70) No space found before comment text; expected "// $node->id = 'downloadcenter';" but found "//$node->id = 'downloadcenter';"
(#75) Line exceeds 132 characters; contains 148 characters
(#75) Inline comments must start with a capital letter, digit or 3-dots sequence
(#75) No space found before comment text; expected "// yet another retarded hack to work around moodle's strange removal of leaf nodes from the settings navigation" but found "//yet another retarded hack to work around moodle's strange removal of leaf nodes from the settings navigation"
(#76) Line exceeds maximum limit of 180 characters; contains 238 characters
(#76) No space found before comment text; expected "// we need the empty invisible row, otherwise in lib/navigationlib.php, settings_navigation/initialize(), at the end of the function the empty nodes are removed for some really strange unknown moodle reason." but found "//we need the empty invisible row, otherwise in lib/navigationlib.php, settings_navigation/initialize(), at the end of the function the empty nodes are removed for some really strange unknown moodle reason."
(#115) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#118) Functions must not contain multiple empty lines in a row; found 3 empty lines
(#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 50% valid code; is this commented out code?
(#134) No space found before comment text; expected "// $node->id = 'downloadcenter';" but found "//$node->id = 'downloadcenter';"
local/downloadcenter/locallib.php
(#45) Inline comments must start with a capital letter, digit or 3-dots sequence
(#45) Inline comments must end in full-stops, exclamation marks, or question marks
(#45) No space found before comment text; expected "// only downloadable resources should be shown" but found "//only downloadable resources should be shown"
(#56) Line exceeds 132 characters; contains 136 characters
(#77) No space found before comment text; expected "// TODO: fix empty names here!!!" but found "//TODO: fix empty names here!!!"
(#91) Inline comments must end in full-stops, exclamation marks, or question marks
(#91) No space found before comment text; expected "// TODO: fix here if needed" but found "//TODO: fix here if needed"
(#105) Inline comments must end in full-stops, exclamation marks, or question marks
(#112) Inline comments must start with a capital letter, digit or 3-dots sequence
(#112) Inline comments must end in full-stops, exclamation marks, or question marks
(#113) Expected 1 space before "=>"; 0 found
(#113) Expected 1 space after "=>"; 0 found
(#113) Expected 1 space before "=>"; 0 found
(#113) Expected 1 space after "=>"; 0 found
(#116) Variable "available_sections" must not contain underscores.
(#128) Variable "available_sections" must not contain underscores.
(#138) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#141) No space found before comment text; expected "// TODO: $cm->visible.." but found "//TODO: $cm->visible.."
(#152) Functions must not contain multiple empty lines in a row; found 3 empty lines
(#181) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#183) Empty IF statement detected
(#184) Inline comments must start with a capital letter, digit or 3-dots sequence
(#184) Inline comments must end in full-stops, exclamation marks, or question marks
(#184) This comment is 60% valid code; is this commented out code?
(#184) Line indented incorrectly; expected at least 12 spaces, found 11
(#187) Inline comments must start with a capital letter, digit or 3-dots sequence
(#187) Inline comments must end in full-stops, exclamation marks, or question marks
(#187) No space found before comment text; expected "// needed for mod_publication" but found "//needed for mod_publication"
(#190) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#202) Inline comments must start with a capital letter, digit or 3-dots sequence
(#202) Inline comments must end in full-stops, exclamation marks, or question marks
(#202) No space found before comment text; expected "// get only the first file - such are the requirements" but found "//get only the first file - such are the requirements"
(#209) Expected "} else if (...) {\n"; found "}\n else if (...) {\n"
(#250) This comment is 47% valid code; is this commented out code?
(#250) Expected 1 space before comment text but found 6; use block comment if you need indentation
(#252) Inline comments must end in full-stops, exclamation marks, or question marks
(#278) Whitespace found at end of line
(#313) Inline comments must end in full-stops, exclamation marks, or question marks
(#367) Inline comments must start with a capital letter, digit or 3-dots sequence
(#367) Inline comments must end in full-stops, exclamation marks, or question marks
(#367) This comment is 78% valid code; is this commented out code?
(#367) No space found before comment text; expected "// var_dump($file->get_filepath());" but found "//var_dump($file->get_filepath());"
(#373) Inline comments must start with a capital letter, digit or 3-dots sequence
(#373) Inline comments must end in full-stops, exclamation marks, or question marks
(#373) This comment is 56% valid code; is this commented out code?
(#373) No space found before comment text; expected "// $content = format_string($content);" but found "//$content = format_string($content);"
(#386) Inline comments must start with a capital letter, digit or 3-dots sequence
(#386) Inline comments must end in full-stops, exclamation marks, or question marks
(#386) No space found before comment text; expected "// needs to be array to be saved as file" but found "//needs to be array to be saved as file"
(#394) Inline comments must start with a capital letter, digit or 3-dots sequence
(#394) Inline comments must end in full-stops, exclamation marks, or question marks
(#394) This comment is 73% valid code; is this commented out code?
(#394) No space found before comment text; expected "// send_temp_file($tempzip, clean_filename($filename));" but found "//send_temp_file($tempzip, clean_filename($filename));"
(#444) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#466) Variable "max_length" must not contain underscores.
(#468) Variable "max_length" must not contain underscores.
(#471) Variable "max_length" must not contain underscores.
(#471) Expected 1 space before "/"; 0 found
(#471) Expected 1 space after "/"; 0 found
(#471) Expected 1 space before "-"; 0 found
(#471) Expected 1 space after "-"; 0 found
(#472) Expected 1 space before "-"; 0 found
(#472) Expected 1 space after "-"; 0 found

Javascript coding style problems

(0 errors, 29 warnings)

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

local/downloadcenter/amd/src/modfilter.js
(#19) Missing JSDoc for parameter 'modnms'. (valid-jsdoc)
(#36) Expected space or tab after '//' in comment. (spaced-comment)
(#37) ["all"] is better written in dot notation. (dot-notation)
(#38) ["none"] is better written in dot notation. (dot-notation)
(#39) ["select"] is better written in dot notation. (dot-notation)
(#40) ["showtypes"] is better written in dot notation. (dot-notation)
(#41) ["hidetypes"] is better written in dot notation. (dot-notation)
(#46) ["select"] is better written in dot notation. (dot-notation)
(#47) ["showtypes"] is better written in dot notation. (dot-notation)
(#74) Expected space or tab after '//' in comment. (spaced-comment)
(#75) Statement inside of curly braces should be on next line. (brace-style)
(#75) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#75) Multiple spaces found before ''item_''. (no-multi-spaces)
(#76) Statement inside of curly braces should be on next line. (brace-style)
(#76) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#77) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#77) Statement inside of curly braces should be on next line. (brace-style)
(#87) ["showtypes"] is better written in dot notation. (dot-notation)
(#89) ["hidetypes"] is better written in dot notation. (dot-notation)
(#91) There should be no space before '}'. (object-curly-spacing)
(#98) Statement inside of curly braces should be on next line. (brace-style)
(#98) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#99) Statement inside of curly braces should be on next line. (brace-style)
(#99) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#133) Identifier 'html_generator' is not in camel case. (camelcase)
(#141) ["all"] is better written in dot notation. (dot-notation)
(#142) ["none"] is better written in dot notation. (dot-notation)
(#150) More than 2 blank lines not allowed. (no-multiple-empty-lines)
(#153) A constructor name should not start with a lowercase letter. (new-cap)

CSS problems

(6 errors, 0 warnings)

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

local/downloadcenter/styles.css
(#85) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#95) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#71) Expected single space before "{" (block-opening-brace-space-before)
(#76) Expected single space before "{" (block-opening-brace-space-before)
(#87) Unexpected !important (declaration-no-important)
(#10) Expected newline after "," (selector-list-comma-newline-after)

PHPDocs style problems

(39 errors, 2 warnings)

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

local/downloadcenter/classes/event/plugin_viewed.php
(#2) Empty line found after PHP open tag
(#3) File-level phpdocs block is not found
(#9) Class plugin_viewed is not documented
(#10) Function plugin_viewed::init is not documented
(#16) Function plugin_viewed::get_name is not documented
(#20) Function plugin_viewed::get_description is not documented
(#24) Function plugin_viewed::get_url is not documented
(#9) Package is not specified for class plugin_viewed. It is also not specified in file-level phpdocs
local/downloadcenter/classes/event/zip_downloaded.php
(#2) Empty line found after PHP open tag
(#3) File-level phpdocs block is not found
(#9) Class zip_downloaded is not documented
(#10) Function zip_downloaded::init is not documented
(#16) Function zip_downloaded::get_name is not documented
(#20) Function zip_downloaded::get_description is not documented
(#24) Function zip_downloaded::get_url is not documented
(#9) Package is not specified for class zip_downloaded. It is also not specified in file-level phpdocs
local/downloadcenter/download_form.php
(#31) Class local_downloadcenter_download_form is not documented
(#67) Class local_downloadcenter_download_final_form is not documented
(#32) Function local_downloadcenter_download_form::definition is not documented
(#68) Function local_downloadcenter_download_final_form::definition is not documented
local/downloadcenter/lib.php
(#29) Function local_downloadcenter_extend_settings_navigation is not documented
(#80) Function local_downloadcenter_extend_navigation is not documented
local/downloadcenter/locallib.php
(#28) Class local_downloadcenter_factory is not documented
(#37) Function local_downloadcenter_factory::__construct is not documented
(#42) Function local_downloadcenter_factory::get_resources_for_user is not documented
(#160) Function local_downloadcenter_factory::get_js_modnames is not documented
(#164) Function local_downloadcenter_factory::create_zip is not documented
(#403) Function local_downloadcenter_factory::add_file_to_session is not documented
(#416) Function local_downloadcenter_factory::get_file_from_session is not documented
(#429) Function local_downloadcenter_factory::add_folder_contents is not documented
(#441) Function local_downloadcenter_factory::parse_form_data is not documented
(#466) Function local_downloadcenter_factory::shorten_filename is not documented
(#29) Variable local_downloadcenter_factory::$course is not documented
(#30) Variable local_downloadcenter_factory::$user is not documented
(#31) Variable local_downloadcenter_factory::$sortedresources is not documented
(#32) Variable local_downloadcenter_factory::$filteredresources is not documented
(#33) Variable local_downloadcenter_factory::$availableresources is not documented
(#34) Variable local_downloadcenter_factory::$jsnames is not documented
(#35) Variable local_downloadcenter_factory::$progress is not documented
local/downloadcenter/renderer.php
(#29) Class local_downloadcenter_renderer is not documented
local/downloadcenter/version.php
(#17) No one-line description found in phpdocs for file

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]

Task "stylelint:css" failed. Use --force to continue.
Problems running grunt

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]