Prechecker results: error


Overview

(0 errors, 0 warnings)

This section shows the general problems detected when processing the code [More info]


PHP lint problems

(0 errors, 0 warnings)

This section shows php lint problems in the code detected by php -l [More info]


PHP coding style problems

(120 errors, 46 warnings)

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

public/course/format/weeksrev/backup/moodle2/restore_format_weeksrev_plugin.class.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#40) Opening brace must not be followed by a blank line
(#72) There should be a comma after the last array item in a multi-line array.
(#111) Opening parenthesis of a multi-line function call must be the last content on the line
(#112) Multi-line function call not indented correctly; expected 20 spaces but found 24
(#112) Closing parenthesis of a multi-line function call must be on a line by itself
(#129) The first expression of a multi-line control structure must be on the line after the opening parenthesis
(#130) The closing parenthesis of a multi-line control structure must be on the line after the last expression
(#133) Multi-line function call not indented correctly; expected 12 spaces but found 16
(#133) Closing parenthesis of a multi-line function call must be on a line by itself
(#146) Function closing brace must go on the next line following the body; found 1 blank lines before brace
public/course/format/weeksrev/classes/observer.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#36) Opening brace must not be followed by a blank line
public/course/format/weeksrev/classes/output/renderer.php
(#38) Expected at least 1 space before "."; 0 found
(#38) Expected at least 1 space after "."; 0 found
(#39) Expected at least 1 space before "."; 0 found
(#39) Expected at least 1 space after "."; 0 found
(#49) Opening brace must not be followed by a blank line
(#105) Incorrect spacing between argument "$sectionreturn" and equals sign; expected 1 but found 0
(#105) Incorrect spacing between default value and equals sign for argument "$sectionreturn"; expected 1 but found 0
(#166) Inline comments must end in full-stops, exclamation marks, or question marks
(#179) Expected at least 1 space before "."; 0 found
(#179) Expected at least 1 space after "."; 0 found
(#187) Opening parenthesis of a multi-line function call must be the last content on the line
(#187) Only one argument is allowed per line in a multi-line function call
(#188) Multi-line function call not indented correctly; expected 12 spaces but found 16
(#188) Closing parenthesis of a multi-line function call must be on a line by itself
(#220) Opening parenthesis of a multi-line function call must be the last content on the line
(#237) global $PAGE cannot be used in renderers. Use $this->page.
(#250) Opening parenthesis of a multi-line function call must be the last content on the line
(#260) global $PAGE cannot be used in renderers. Use $this->page.
(#268) Logical operator "or" is prohibited; use "||" instead
(#268) Logical operator "or" is prohibited; use "||" instead
(#268) global $PAGE cannot be used in renderers. Use $this->page.
(#294) global $PAGE cannot be used in renderers. Use $this->page.
(#302) global $PAGE cannot be used in renderers. Use $this->page.
(#302) Logical operator "and" is prohibited; use "&&" instead
(#305) Logical operator "or" is prohibited; use "||" instead
(#306) Inline comments must start with a capital letter, digit or 3-dots sequence
(#306) Inline comments must end in full-stops, exclamation marks, or question marks
public/course/format/weeksrev/classes/privacy/provider.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
(#24) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#38) There must not be a space before the colon in a return type declaration
public/course/format/weeksrev/db/events.php
(#40) There should be a comma after the last array item in a multi-line array.
public/course/format/weeksrev/db/upgrade.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
public/course/format/weeksrev/format.php
(#30) Expected at least 1 space before "."; 0 found
(#30) Expected at least 1 space after "."; 0 found
(#31) Expected at least 1 space before "."; 0 found
(#31) Expected at least 1 space after "."; 0 found
public/course/format/weeksrev/lang/en/format_weeksrev.php
(#30) The string key "deletesection" is not in the correct order, it should be before "editsectionname"
(#36) The string key "hidefuture_desc" is not in the correct order, it should be before "hidefuture_help"
(#39) The string key "pluginname" is not in the correct order, it should be before "sectionname"
(#41) The string key "page-course-view-weeks" is not in the correct order, it should be before "section0name"
(#43) The string key "hidefromothers" is not in the correct order, it should be before "page-course-view-weeks-x"
(#45) The string key "automaticenddate" is not in the correct order, it should be before "showfromothers"
(#48) Unexpected string end, it should be a line feed after a semicolon
(#48) Expected 1 newline at end of file; 0 found
public/course/format/weeksrev/lib.php
(#28) Expected at least 1 space before "."; 0 found
(#29) Expected at least 1 space before "."; 0 found
(#41) Opening brace must not be followed by a blank line
(#90) Expected at least 1 space before "."; 0 found
(#90) Expected at least 1 space after "."; 0 found
(#90) Expected at least 1 space before "."; 0 found
(#90) Expected at least 1 space after "."; 0 found
(#104) Short array syntax must be used to define arrays
(#151) The first expression of a multi-line control structure must be on the line after the opening parenthesis
(#152) The closing parenthesis of a multi-line control structure must be on the line after the last expression
(#181) Short array syntax must be used to define arrays
(#194) Short array syntax must be used to define arrays
(#204) Short array syntax must be used to define arrays
(#205) Short array syntax must be used to define arrays
(#206) Short array syntax must be used to define arrays
(#206) There should be a comma after the last array item in a multi-line array.
(#226) Short array syntax must be used to define arrays
(#227) Short array syntax must be used to define arrays
(#231) Short array syntax must be used to define arrays
(#239) Short array syntax must be used to define arrays
(#246) Short array syntax must be used to define arrays
(#247) Short array syntax must be used to define arrays
(#252) Short array syntax must be used to define arrays
(#253) Short array syntax must be used to define arrays
(#255) There should be a comma after the last array item in a multi-line array.
(#256) There should be a comma after the last array item in a multi-line array.
(#259) Short array syntax must be used to define arrays
(#262) Short array syntax must be used to define arrays
(#263) Short array syntax must be used to define arrays
(#265) There should be a comma after the last array item in a multi-line array.
(#266) There should be a comma after the last array item in a multi-line array.
(#277) Short array syntax must be used to define arrays
(#282) There should be a comma after the last array item in a multi-line array.
(#495) The first parameter of a multi-line function declaration must be on the line after the opening bracket
(#495) Multi-line function declarations must define one parameter per line
(#496) Multi-line function declaration not indented correctly; expected 8 spaces but found 57
(#496) Multi-line function declarations must define one parameter per line
(#496) Multi-line function declarations must define one parameter per line
(#496) The closing parenthesis of a multi-line function declaration must be on a new line
(#513) Short array syntax must be used to define arrays
(#562) Missing docblock for function section_action
(#608) Opening parenthesis of a multi-line function call must be the last content on the line
(#609) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#609) Closing parenthesis of a multi-line function call must be on a line by itself
(#633) Short array syntax must be used to define arrays
(#669) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#669) Short array syntax must be used to define arrays
(#669) Only one argument is allowed per line in a multi-line function call
(#669) Closing parenthesis of a multi-line function call must be on a line by itself
public/course/format/weeksrev/tests/format_weeksrev_test.php
(#42) Testcase format_weeksrev_testcase should be declared as abstract.
(#42) PHPUnit testcase name "format_weeksrev_testcase" does not match file name "format_weeksrev_test"
(#42) PHPUnit class "format_weeksrev_testcase" does not have any namespace. It is recommended to add it to the "format_weeksrev" namespace, using more levels if needed, in order to match the code being tested
(#42) Opening brace must not be followed by a blank line
(#47) Test method test_get_section_name() is missing any coverage information, own or at class level
(#47) Test method test_get_section_name() is missing a return type
(#54) Opening parenthesis of a multi-line function call must be the last content on the line
(#55) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#55) Closing parenthesis of a multi-line function call must be on a line by itself
(#71) Test method test_get_section_name_customised() is missing any coverage information, own or at class level
(#71) Test method test_get_section_name_customised() is missing a return type
(#78) Opening parenthesis of a multi-line function call must be the last content on the line
(#79) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#79) Closing parenthesis of a multi-line function call must be on a line by itself
(#103) Test method test_get_default_section_name() is missing any coverage information, own or at class level
(#103) Test method test_get_default_section_name() is missing a return type
(#110) Opening parenthesis of a multi-line function call must be the last content on the line
(#111) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#111) Closing parenthesis of a multi-line function call must be on a line by itself
(#128) Expected at least 1 space before "."; 0 found
(#128) Expected at least 1 space after "."; 0 found
(#128) Expected at least 1 space before "."; 0 found
(#128) Expected at least 1 space after "."; 0 found
(#138) Test method test_update_inplace_editable() is missing any coverage information, own or at class level
(#138) Test method test_update_inplace_editable() is missing a return type
(#145) Opening parenthesis of a multi-line function call must be the last content on the line
(#146) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#146) Closing parenthesis of a multi-line function call must be on a line by itself
(#154) Opening parenthesis of a multi-line function call must be the last content on the line
(#155) Multi-line function call not indented correctly; expected 12 spaces but found 20
(#155) Closing parenthesis of a multi-line function call must be on a line by itself
(#171) Test method test_inplace_editable() is missing any coverage information, own or at class level
(#171) Test method test_inplace_editable() is missing a return type
(#176) Opening parenthesis of a multi-line function call must be the last content on the line
(#177) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#177) Closing parenthesis of a multi-line function call must be on a line by itself
(#205) Test method test_default_course_enddate() is missing any coverage information, own or at class level
(#205) Test method test_default_course_enddate() is missing a return type
(#223) There should be a comma after the last array item in a multi-line array.
(#242) Test method test_get_view_url() is missing any coverage information, own or at class level
(#242) Test method test_get_view_url() is missing a return type
public/course/format/weeksrev/tests/observer_test.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#36) Testcase format_weeksrev_observer_testcase should be declared as abstract.
(#36) PHPUnit testcase name "format_weeksrev_observer_testcase" does not match file name "observer_test"
(#36) PHPUnit class "format_weeksrev_observer_testcase" does not have any namespace. It is recommended to add it to the "format_weeksrev" namespace, using more levels if needed, in order to match the code being tested
(#36) Opening brace must not be followed by a blank line
(#41) The setUp() method in unit tests must always call to parent::setUp().
(#48) Test method test_course_updated_with_automatic_end_date() is missing any coverage information, own or at class level
(#48) Test method test_course_updated_with_automatic_end_date() is missing a return type
(#77) Test method test_course_updated_with_automatic_end_date_no_change() is missing any coverage information, own or at class level
(#77) Test method test_course_updated_with_automatic_end_date_no_change() is missing a return type
(#103) Test method test_course_updated_without_automatic_end_date() is missing any coverage information, own or at class level
(#103) Test method test_course_updated_without_automatic_end_date() is missing a return type
(#130) Test method test_course_section_created_with_automatic_end_date() is missing any coverage information, own or at class level
(#130) Test method test_course_section_created_with_automatic_end_date() is missing a return type
(#156) Test method test_create_section_without_automatic_end_date() is missing any coverage information, own or at class level
(#156) Test method test_create_section_without_automatic_end_date() is missing a return type
(#188) Test method test_course_section_deleted_with_automatic_end_date() is missing any coverage information, own or at class level
(#188) Test method test_course_section_deleted_with_automatic_end_date() is missing a return type
public/course/format/weeksrev/version.php
(#20) Incorrect @package tag for file version.php. Expected format_weeksrev, found format.

Javascript coding style problems

(0 errors, 15 warnings)

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

public/course/format/weeksrev/format.js
(#19) Identifier 'get_config' is not in camel case. (camelcase)
(#21) Identifier 'container_node' is not in camel case. (camelcase)
(#21) Extra space after key 'container_node'. (key-spacing)
(#22) Identifier 'container_class' is not in camel case. (camelcase)
(#22) Extra space after key 'container_class'. (key-spacing)
(#23) Identifier 'section_node' is not in camel case. (camelcase)
(#23) Extra space after key 'section_node'. (key-spacing)
(#24) Identifier 'section_class' is not in camel case. (camelcase)
(#24) Extra space after key 'section_class'. (key-spacing)
(#36) Identifier 'swap_sections' is not in camel case. (camelcase)
(#38) Extra space after key 'COURSECONTENT'. (key-spacing)
(#39) Extra space after key 'SECTIONADDMENUS'. (key-spacing)
(#56) Identifier 'process_sections' is not in camel case. (camelcase)
(#58) Extra space after key 'SECTIONNAME'. (key-spacing)
(#61) Extra space after key 'SECTIONLEFTSIDE'. (key-spacing)

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(4 errors, 0 warnings)

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

public/course/format/weeksrev/lib.php
(#292) Inline phpdocs tag {@link course_edit_form::definition_after_data()} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
(#337) Inline phpdocs tag {@link moodleform::get_data()} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
(#338) Inline phpdocs tag {@link update_course()} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
(#477) Inline phpdocs tag {@link course_can_delete_section()} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}

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

(0 errors, 0 warnings)

This section shows files built by grunt and not commited [More info]


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]