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

(123 errors, 10 warnings)

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

blocks/searchcourses/block_searchcourses.php
(#31) Expected MOODLE_INTERNAL check or config.php inclusion
(#33) Whitespace found at end of line
(#35) Opening brace should be on the same line as the declaration
(#38) Whitespace found at end of line
(#40) Opening brace should be on the same line as the declaration
(#47) Opening brace should be on the same line as the declaration
(#56) Opening brace should be on the same line as the declaration
(#72) Line indented incorrectly; expected at least 12 spaces, found 11
(#75) Variable "form_html" must not contain underscores.
(#76) Variable "form_html" must not contain underscores.
(#79) Variable "form_html" must not contain underscores.
(#80) Variable "form_html" must not contain underscores.
(#81) Variable "form_html" must not contain underscores.
(#82) Variable "form_html" must not contain underscores.
(#82) Line exceeds maximum limit of 180 characters; contains 202 characters
(#83) Variable "form_html" must not contain underscores.
(#84) Variable "form_html" must not contain underscores.
(#85) Variable "form_html" must not contain underscores.
blocks/searchcourses/db/access.php
(#2) Inline comments must end in full-stops, exclamation marks, or question marks
(#2) Line 1 of the opening comment must start "// This file is part of".
(#2) No space found before comment text; expected "// Capabilities for the block" but found "//Capabilities for the block"
(#3) Line 2 of the opening comment must start "//".
(#4) Inline comments must end in full-stops, exclamation marks, or question marks
(#4) Line 3 of the opening comment must start "// Moodle is free software: you can redistribute it and/or modify".
(#4) No space found before comment text; expected "// NOTE: This has changed in Moodle 2.4 because of the addition of new capabilities" but found "//NOTE: This has changed in Moodle 2.4 because of the addition of new capabilities"
(#5) Line 4 of the opening comment must start "// it under the terms of the GNU General Public License as published by".
(#5) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
(#5) Line 5 of the opening comment must start "// the Free Software Foundation, either version 3 of the License, or".
(#5) Line 6 of the opening comment must start "// (at your option) any later version.".
(#5) Line 7 of the opening comment must start "//".
(#5) Line 8 of the opening comment must start "// Moodle is distributed in the hope that it will be useful,".
(#5) Line 9 of the opening comment must start "// but WITHOUT ANY WARRANTY; without even the implied warranty of".
(#5) Line 10 of the opening comment must start "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the".
(#6) Line 11 of the opening comment must start "// GNU General Public License for more details.".
(#7) Line 12 of the opening comment must start "//".
(#7) Line 13 of the opening comment must start "// You should have received a copy of the GNU General Public License".
(#7) Line 14 of the opening comment must start "// along with Moodle. If not, see <http://www.gnu.org/licenses/>.".
(#44) Line indented incorrectly; expected at least 9 spaces, found 8
(#47) Whitespace found at end of line
blocks/searchcourses/edit_form.php
(#2) The opening <?php tag must be followed by exactly one newline.
(#3) Expected MOODLE_INTERNAL check or config.php inclusion
(#4) Spaces must be used to indent lines; tabs are not allowed
(#4) Tab found within whitespace
(#4) Whitespace found at end of line
(#5) Spaces must be used to indent lines; tabs are not allowed
(#5) Tab found within whitespace
(#5) Line indented incorrectly; expected 4 spaces, found 1
(#5) Expected 1 space after closing parenthesis; found 0
(#6) Spaces must be used to indent lines; tabs are not allowed
(#6) Tab found within whitespace
(#6) Inline comments must end in full-stops, exclamation marks, or question marks
(#6) Line indented incorrectly; expected at least 8 spaces, found 2
(#6) No space found before comment text; expected "// Header" but found "//Header"
(#7) Spaces must be used to indent lines; tabs are not allowed
(#7) Tab found within whitespace
(#7) Line indented incorrectly; expected at least 8 spaces, found 2
(#8) Spaces must be used to indent lines; tabs are not allowed
(#8) Tab found within whitespace
(#8) Inline comments must end in full-stops, exclamation marks, or question marks
(#8) Line indented incorrectly; expected at least 8 spaces, found 2
(#8) No space found before comment text; expected "// Number of courses to show in the drop-down" but found "//Number of courses to show in the drop-down"
(#9) Spaces must be used to indent lines; tabs are not allowed
(#9) Tab found within whitespace
(#9) Line indented incorrectly; expected at least 8 spaces, found 2
(#9) Variable "course_count_attributes" must not contain underscores.
(#9) Expected 1 space before "=>"; 0 found
(#9) Expected 1 space after "=>"; 0 found
(#10) Spaces must be used to indent lines; tabs are not allowed
(#10) Tab found within whitespace
(#10) Line indented incorrectly; expected at least 8 spaces, found 2
(#10) Commas (,) must be followed by white space.
(#10) Commas (,) must be followed by white space.
(#10) Commas (,) must be followed by white space.
(#10) Commas (,) must be followed by white space.
(#10) Variable "course_count_attributes" must not contain underscores.
(#11) Spaces must be used to indent lines; tabs are not allowed
(#11) Tab found within whitespace
(#11) Line indented incorrectly; expected at least 8 spaces, found 2
(#11) Commas (,) must be followed by white space.
(#12) Spaces must be used to indent lines; tabs are not allowed
(#12) Tab found within whitespace
(#12) Line indented incorrectly; expected at least 8 spaces, found 2
(#12) Commas (,) must be followed by white space.
(#13) Spaces must be used to indent lines; tabs are not allowed
(#13) Tab found within whitespace
(#13) Line indented incorrectly; expected 4 spaces, found 1
blocks/searchcourses/lang/en/block_searchcourses.php
(#2) Line 1 of the opening comment must start "// This file is part of".
(#2) Line 2 of the opening comment must start "//".
(#2) Line 3 of the opening comment must start "// Moodle is free software: you can redistribute it and/or modify".
(#2) Line 4 of the opening comment must start "// it under the terms of the GNU General Public License as published by".
(#2) Line 5 of the opening comment must start "// the Free Software Foundation, either version 3 of the License, or".
(#2) Line 6 of the opening comment must start "// (at your option) any later version.".
(#2) Line 7 of the opening comment must start "//".
(#2) Line 8 of the opening comment must start "// Moodle is distributed in the hope that it will be useful,".
(#2) Line 9 of the opening comment must start "// but WITHOUT ANY WARRANTY; without even the implied warranty of".
(#2) Line 10 of the opening comment must start "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the".
(#3) Line 11 of the opening comment must start "// GNU General Public License for more details.".
(#3) Line 12 of the opening comment must start "//".
(#3) Line 13 of the opening comment must start "// You should have received a copy of the GNU General Public License".
(#3) Line 14 of the opening comment must start "// along with Moodle. If not, see <http://www.gnu.org/licenses/>.".
blocks/searchcourses/result.php
(#2) Line 1 of the opening comment must start "// This file is part of".
(#2) Line 2 of the opening comment must start "//".
(#2) Line 3 of the opening comment must start "// Moodle is free software: you can redistribute it and/or modify".
(#2) Line 4 of the opening comment must start "// it under the terms of the GNU General Public License as published by".
(#2) Line 5 of the opening comment must start "// the Free Software Foundation, either version 3 of the License, or".
(#2) Line 6 of the opening comment must start "// (at your option) any later version.".
(#3) Line 7 of the opening comment must start "//".
(#3) Line 8 of the opening comment must start "// Moodle is distributed in the hope that it will be useful,".
(#3) Line 9 of the opening comment must start "// but WITHOUT ANY WARRANTY; without even the implied warranty of".
(#3) Line 10 of the opening comment must start "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the".
(#3) Line 11 of the opening comment must start "// GNU General Public License for more details.".
(#4) Line 12 of the opening comment must start "//".
(#5) Line 13 of the opening comment must start "// You should have received a copy of the GNU General Public License".
(#5) Expected "if (...) {\n"; found "if(...){\n"
(#5) Line 14 of the opening comment must start "// along with Moodle. If not, see <http://www.gnu.org/licenses/>.".
(#12) Variable "my_courses_flag" must not contain underscores.
(#15) Variable "course_count" must not contain underscores.
(#15) Inline comments must end in full-stops, exclamation marks, or question marks
(#17) Variable "course_count" must not contain underscores.
(#20) Variable "my_courses_flag" must not contain underscores.
(#21) Variable "course_count" must not contain underscores.
(#22) Inline comments must end in full-stops, exclamation marks, or question marks
(#22) No space found before comment text; expected "// Once you have the results, filter the ones matching the search query" but found "//Once you have the results, filter the ones matching the search query"
(#24) Variable "objCourse" must be all lower-case
(#25) Variable "objCourse" must be all lower-case
(#26) Variable "objCourse" must be all lower-case
(#31) Whitespace found at end of line
(#35) Variable "course_count" must not contain underscores.
(#37) Variable "objCourse" must be all lower-case
(#38) Variable "objCourse" must be all lower-case
(#40) Variable "objCourse" must be all lower-case
blocks/searchcourses/version.php
(#29) Inline comments must end in full-stops, exclamation marks, or question marks
(#32) Inline comments must end in full-stops, exclamation marks, or question marks

Javascript coding style problems

(0 errors, 13 warnings)

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

blocks/searchcourses/js/module.js
(#22) Expected '===' and instead saw '=='.
(#34) Expected '===' and instead saw '=='.
(#43) Missing semicolon.
(#53) Missing semicolon.
(#67) Expected '===' and instead saw '=='.
(#93) Missing semicolon.
(#94) Missing semicolon.
(#95) 'noResTemplate' was used before it was defined.
(#96) 'courseTemplate' was used before it was defined.
(#19) 'e' is defined but never used.
(#38) 'txtBox' is defined but never used.
(#40) 'val' is defined but never used.
(#41) 'InpNode' is defined but never used.

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(15 errors, 1 warnings)

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

blocks/searchcourses/block_searchcourses.php
(#34) Function block_searchcourses::init is not documented
(#39) Function block_searchcourses::autocomplete_js is not documented
(#46) Function block_searchcourses::applicable_formats is not documented
(#55) Function block_searchcourses::get_content is not documented
(#28) Class block_searchcourses does not have @copyright tag
(#28) Class block_searchcourses does not have @license tag
(#20) Package block is not valid
blocks/searchcourses/db/access.php
(#5) File-level phpdocs block is not found
blocks/searchcourses/edit_form.php
(#2) Empty line found after PHP open tag
(#3) File-level phpdocs block is not found
(#3) Class block_searchcourses_edit_form is not documented
(#5) Function block_searchcourses_edit_form::specific_definition is not documented
(#3) Package is not specified for class block_searchcourses_edit_form. It is also not specified in file-level phpdocs
blocks/searchcourses/lang/en/block_searchcourses.php
(#2) File-level phpdocs block is not found
blocks/searchcourses/result.php
(#2) File-level phpdocs block is not found
blocks/searchcourses/version.php
(#20) Package block is not valid

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]


Mustache template problems

(0 errors, 0 warnings)

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