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

(67 errors, 72 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
(#42) Inline comments must start with a capital letter, digit or 3-dots sequence
(#42) Inline comments must end in full-stops, exclamation marks, or question marks
(#42) This comment is 70% valid code; is this commented out code?
(#42) No space found before comment text; expected "// $PAGE->navbar->add(get_string('navigationlink', 'local_downloadcenter'), $PAGE->url);" but found "//$PAGE->navbar->add(get_string('navigationlink', 'local_downloadcenter'), $PAGE->url);"
(#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!!!"
(#85) Expected 1 space after "="; 2 found
(#92) Inline comments must end in full-stops, exclamation marks, or question marks
(#92) No space found before comment text; expected "// TODO: fix here if needed" but found "//TODO: fix here if needed"
(#106) Inline comments must end in full-stops, exclamation marks, or question marks
(#113) Inline comments must start with a capital letter, digit or 3-dots sequence
(#113) Inline comments must end in full-stops, exclamation marks, or question marks
(#114) Expected 1 space before "=>"; 0 found
(#114) Expected 1 space after "=>"; 0 found
(#114) Expected 1 space before "=>"; 0 found
(#114) Expected 1 space after "=>"; 0 found
(#117) Variable "available_sections" must not contain underscores.
(#129) Variable "available_sections" must not contain underscores.
(#139) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#142) No space found before comment text; expected "// TODO: $cm->visible.." but found "//TODO: $cm->visible.."
(#153) Functions must not contain multiple empty lines in a row; found 3 empty lines
(#182) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#184) Empty IF statement detected
(#185) Inline comments must start with a capital letter, digit or 3-dots sequence
(#185) Inline comments must end in full-stops, exclamation marks, or question marks
(#185) This comment is 60% valid code; is this commented out code?
(#185) Line indented incorrectly; expected at least 12 spaces, found 11
(#188) Inline comments must start with a capital letter, digit or 3-dots sequence
(#188) Inline comments must end in full-stops, exclamation marks, or question marks
(#188) No space found before comment text; expected "// needed for mod_publication" but found "//needed for mod_publication"
(#191) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#203) Inline comments must start with a capital letter, digit or 3-dots sequence
(#203) Inline comments must end in full-stops, exclamation marks, or question marks
(#203) 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"
(#210) Expected "} else if (...) {\n"; found "}\n else if (...) {\n"
(#251) This comment is 47% valid code; is this commented out code?
(#251) Expected 1 space before comment text but found 6; use block comment if you need indentation
(#253) Inline comments must end in full-stops, exclamation marks, or question marks
(#279) Whitespace found at end of line
(#314) Inline comments must end in full-stops, exclamation marks, or question marks
(#368) Inline comments must start with a capital letter, digit or 3-dots sequence
(#368) Inline comments must end in full-stops, exclamation marks, or question marks
(#368) This comment is 78% valid code; is this commented out code?
(#368) No space found before comment text; expected "// var_dump($file->get_filepath());" but found "//var_dump($file->get_filepath());"
(#374) Inline comments must start with a capital letter, digit or 3-dots sequence
(#374) Inline comments must end in full-stops, exclamation marks, or question marks
(#374) This comment is 56% valid code; is this commented out code?
(#374) No space found before comment text; expected "// $content = format_string($content);" but found "//$content = format_string($content);"
(#387) Inline comments must start with a capital letter, digit or 3-dots sequence
(#387) Inline comments must end in full-stops, exclamation marks, or question marks
(#387) 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"
(#395) Inline comments must start with a capital letter, digit or 3-dots sequence
(#395) Inline comments must end in full-stops, exclamation marks, or question marks
(#395) This comment is 73% valid code; is this commented out code?
(#395) No space found before comment text; expected "// send_temp_file($tempzip, clean_filename($filename));" but found "//send_temp_file($tempzip, clean_filename($filename));"
(#445) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#467) Variable "max_length" must not contain underscores.
(#469) Variable "max_length" must not contain underscores.
(#472) Variable "max_length" must not contain underscores.
(#472) Expected 1 space before "/"; 0 found
(#472) Expected 1 space after "/"; 0 found
(#472) Expected 1 space before "-"; 0 found
(#472) Expected 1 space after "-"; 0 found
(#473) Expected 1 space before "-"; 0 found
(#473) Expected 1 space after "-"; 0 found

Javascript coding style problems

(0 errors, 30 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)
(#47) ["select"] is better written in dot notation. (dot-notation)
(#48) ["showtypes"] is better written in dot notation. (dot-notation)
(#75) Expected space or tab after '//' in comment. (spaced-comment)
(#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)
(#76) Multiple spaces found before ''item_''. (no-multi-spaces)
(#77) Statement inside of curly braces should be on next line. (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)
(#78) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#78) Statement inside of curly braces should be on next line. (brace-style)
(#88) ["showtypes"] is better written in dot notation. (dot-notation)
(#90) ["hidetypes"] is better written in dot notation. (dot-notation)
(#92) There should be no space before '}'. (object-curly-spacing)
(#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)
(#100) Statement inside of curly braces should be on next line. (brace-style)
(#100) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#134) Identifier 'html_generator' is not in camel case. (camelcase)
(#135) ["all"] is better written in dot notation. (dot-notation)
(#136) ["none"] is better written in dot notation. (dot-notation)
(#140) Identifier 'row_generator' is not in camel case. (camelcase)
(#151) More than 2 blank lines not allowed. (no-multiple-empty-lines)
(#154) A constructor name should not start with a lowercase letter. (new-cap)

CSS problems

(10 errors, 0 warnings)

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

local/downloadcenter/styles.css
(#110) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#141) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#147) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#162) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#171) Expected single space after at-rule name "@media" (at-rule-name-space-after)
(#52) Expected single space before "{" (block-opening-brace-space-before)
(#57) Expected single space before "{" (block-opening-brace-space-before)
(#115) Unexpected !important (declaration-no-important)
(#111) Expected indentation of 4 spaces (indentation)
(#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
(#161) Function local_downloadcenter_factory::get_js_modnames is not documented
(#165) Function local_downloadcenter_factory::create_zip is not documented
(#404) Function local_downloadcenter_factory::add_file_to_session is not documented
(#417) Function local_downloadcenter_factory::get_file_from_session is not documented
(#430) Function local_downloadcenter_factory::add_folder_contents is not documented
(#442) Function local_downloadcenter_factory::parse_form_data is not documented
(#467) 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]