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

(65 errors, 30 warnings)

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

public/blocks/todo/block_todo.php
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#36) Opening brace must not be followed by a blank line
(#94) There should be a comma after the last array item in a multi-line array.
public/blocks/todo/classes/external/add_item.php
(#37) Expected at least 1 space before "."; 0 found
(#37) Expected at least 1 space after "."; 0 found
(#42) Opening brace must not be followed by a blank line
(#74) Declaring an optional parameter with a nullable type before a required parameter is soft deprecated since PHP 8.0 and hard deprecated since PHP 8.1 Parameter $duedate is optional, while parameter $groupid is required. The $duedate parameter is implicitly treated as a required parameter.
public/blocks/todo/classes/external/api.php
(#30) Expected at least 1 space before "."; 0 found
(#30) Expected at least 1 space after "."; 0 found
(#44) Opening brace must not be followed by a blank line
(#46) The first trait import statement must be declared on the first non-comment line after the class opening brace
public/blocks/todo/classes/external/delete_completed.php
(#35) Expected at least 1 space before "."; 0 found
(#35) Expected at least 1 space after "."; 0 found
(#40) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/delete_item.php
(#38) Expected at least 1 space before "."; 0 found
(#38) Expected at least 1 space after "."; 0 found
(#43) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/edit_item.php
(#37) Expected at least 1 space before "."; 0 found
(#37) Expected at least 1 space after "."; 0 found
(#42) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/group_items.php
(#35) Expected at least 1 space before "."; 0 found
(#35) Expected at least 1 space after "."; 0 found
(#40) Opening brace must not be followed by a blank line
(#80) Expected 1 space after FUNCTION keyword; 0 found
(#100) There should be a comma after the last array item in a multi-line array.
public/blocks/todo/classes/external/hide_done_items.php
(#35) Expected at least 1 space before "."; 0 found
(#35) Expected at least 1 space after "."; 0 found
(#40) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/item_exporter.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#30) Import statements must not begin with a leading backslash
(#31) Import statements must not begin with a leading backslash
(#36) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/list_exporter.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#37) Opening brace must not be followed by a blank line
(#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 80% valid code; is this commented out code?
(#152) No space found before comment text; expected "// ksort($duedates);" but found "//ksort($duedates);"
(#158) Expected "if (...) {\n"; found "if(...){\n"
(#158) Expected 1 space after IF keyword; 0 found
(#158) Expected 1 space after closing parenthesis; found 0
(#247) Space found before semicolon; expected ");" but found ") ;"
public/blocks/todo/classes/external/pin_item.php
(#37) Expected at least 1 space before "."; 0 found
(#37) Expected at least 1 space after "."; 0 found
(#42) Opening brace must not be followed by a blank line
public/blocks/todo/classes/external/toggle_item.php
(#38) Expected at least 1 space before "."; 0 found
(#38) Expected at least 1 space after "."; 0 found
(#43) Opening brace must not be followed by a blank line
public/blocks/todo/classes/item.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#30) Import statements must not begin with a leading backslash
(#35) Opening brace must not be followed by a blank line
public/blocks/todo/classes/privacy/provider.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#43) Expected 4 spaces before interface name; 8 found
(#44) Expected 4 spaces before interface name; 8 found
(#44) Opening brace must not be followed by a blank line
(#46) The first trait import statement must be declared on the first non-comment line after the class opening brace
(#54) Method name "_get_metadata" must not be prefixed with an underscore to indicate visibility
(#76) Method name "_get_contexts_for_userid" must not be prefixed with an underscore to indicate visibility
(#87) There should be a comma after the last array item in a multi-line array.
(#100) Method name "_export_user_data" must not be prefixed with an underscore to indicate visibility
(#109) Opening parenthesis of a multi-line function call must be the last content on the line
(#109) Only one argument is allowed per line in a multi-line function call
(#109) Only one argument is allowed per line in a multi-line function call
(#110) Multi-line function call not indented correctly; expected 8 spaces but found 12
(#110) Closing parenthesis of a multi-line function call must be on a line by itself
(#138) Method name "_delete_data_for_all_users_in_context" must not be prefixed with an underscore to indicate visibility
(#151) Method name "_delete_data_for_user" must not be prefixed with an underscore to indicate visibility
public/blocks/todo/db/upgrade.php
(#38) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#50) Blank line found at start of control structure
(#77) Blank line found at start of control structure
public/blocks/todo/lang/en/block_todo.php
(#47) The string key "pin" is not in the correct order, it should be before "pluginname"
(#53) The string key "privacy:metadata:db:blocktodo:duedate" is not in the correct order, it should be before "privacy:metadata:db:blocktodo:todotext"
(#55) The string key "privacy:metadata:db:blocktodo:hide" is not in the correct order, it should be before "privacy:metadata:db:blocktodo:pin"
(#56) The string key "privacy:metadata:db:blocktodo:groupid" is not in the correct order, it should be before "privacy:metadata:db:blocktodo:hide"
(#58) The string key "refresh" is not in the correct order, it should be before "showcompleted"
public/blocks/todo/tests/external_test.php
(#36) Testcase block_todo_external_testcase should be declared as abstract.
(#36) PHPUnit testcase name "block_todo_external_testcase" does not match file name "external_test"
(#36) PHPUnit class "block_todo_external_testcase" does not have any namespace. It is recommended to add it to the "block_todo" 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
(#47) The setUp() method in unit tests must always call to parent::setUp().
(#60) Invalid docblock tag "@expectedException".
(#62) Test method test_add_item_no_permission() is missing any coverage information, own or at class level
(#62) Test method test_add_item_no_permission() is missing a return type
(#76) Test method test_add_item() is missing any coverage information, own or at class level
(#76) Test method test_add_item() is missing a return type
(#96) Test method test_toggle_item() is missing any coverage information, own or at class level
(#96) Test method test_toggle_item() is missing a return type
(#115) Invalid docblock tag "@expectedException".
(#117) Test method test_toggle_item_by_another_user() is missing any coverage information, own or at class level
(#117) Test method test_toggle_item_by_another_user() is missing a return type
(#130) Test method test_delete_item() is missing any coverage information, own or at class level
(#130) Test method test_delete_item() is missing a return type
(#147) Invalid docblock tag "@expectedException".
(#149) Test method test_delete_item_by_another_user() is missing any coverage information, own or at class level
(#149) Test method test_delete_item_by_another_user() is missing a return type

Javascript coding style problems

(0 errors, 1 warnings)

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

public/blocks/todo/amd/src/control.js
(#440) Expected JSDoc block to be aligned. (jsdoc/check-alignment)

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(17 errors, 0 warnings)

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

public/blocks/todo/classes/external/add_item.php
(#18) Inline phpdocs tag {@link block_todo\external\add_item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/api.php
(#18) Inline phpdocs tag {@link block_todo\external\api} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/delete_completed.php
(#18) Inline phpdocs tag {@link block_todo\external\delete_completed} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/delete_item.php
(#62) Phpdocs for function delete_item::delete_item has incomplete parameters list
(#18) Inline phpdocs tag {@link block_todo\external\delete_item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/edit_item.php
(#18) Inline phpdocs tag {@link block_todo\external\edit_item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/group_items.php
(#18) Inline phpdocs tag {@link block_todo\external\group_items} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/hide_done_items.php
(#18) Inline phpdocs tag {@link block_todo\external\hide_done_items} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/item_exporter.php
(#18) Inline phpdocs tag {@link block_todo\external\item_exporter} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/list_exporter.php
(#194) Phpdocs for function list_exporter::format_due_date_data has incomplete parameters list
(#18) Inline phpdocs tag {@link block_todo\external\list_exporter} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/pin_item.php
(#18) Inline phpdocs tag {@link block_todo\external\pin_item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/external/toggle_item.php
(#18) Inline phpdocs tag {@link block_todo\external\toggle_item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/item.php
(#174) Phpdocs for function item::delete_completed_items has incomplete parameters list
(#18) Inline phpdocs tag {@link block_todo\item} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/classes/privacy/provider.php
(#18) Inline phpdocs tag {@link \block_todo\privacy\provider} with incorrect contents found. It must match {@link [valid URL] [description (optional)]} or {@see [valid FQSEN] [description (optional)]}
public/blocks/todo/tests/external_test.php
(#18) Inline phpdocs tag {@link block_todo_external_testcase} 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

(1 errors, 7 warnings)

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

public/blocks/todo/templates/add.mustache
(#1) Example context missing.
public/blocks/todo/templates/content.mustache
(#1) Mustache syntax exception: Example context JSON is unparsable, fails with: Syntax error
public/blocks/todo/templates/edit.mustache
(#1) Example context missing.
public/blocks/todo/templates/item.mustache
(#1) Example context missing.
(#1) HTML Validation error, line 2: Element “li” not allowed as child of element “body” in this context. (Suppressing further errors from this subtree.) (> <li class="list-group-item d-flex p-3 " data-item="" data-done="" data-text="" data-duedate="" data-groupid=""> )
public/blocks/todo/templates/list.mustache
(#1) Example context missing.
public/blocks/todo/templates/pin.mustache
(#1) Example context missing.
(#1) HTML Validation error, line 3: Element “li” not allowed as child of element “body” in this context. (Suppressing further errors from this subtree.) (d><body><li class="list-group-item p-3 d-flex pinned-item" data-item="" data-done="" data-text="" data-duedate="" data-groupid=""> <)

Gherkin .feature problems

(0 errors, 0 warnings)

This section shows problems detected in behat .feature files [More info]