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

(149 errors, 18 warnings)

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

blocks/analyticswidget/block_analyticswidget.php
(#28) Opening brace must not be followed by a blank line
(#55) Short array syntax must be used to define arrays
(#56) Short array syntax must be used to define arrays
(#104) Short array syntax must be used to define arrays
(#105) There should be a comma after the last array item in a multi-line array.
blocks/analyticswidget/classes/cache.php
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#34) Opening brace must not be followed by a blank line
(#36) Missing docblock for function set_cache
(#36) Expected 0 spaces after "("; 1 found
(#36) Expected 0 spaces after opening parenthesis; 1 found
(#36) Expected 1 space before opening brace; found 0
(#37) Variable "cc_cache" must not contain underscores.
(#40) Expected 1 space after "="; 2 found
(#41) Variable "cc_cache" must not contain underscores.
(#45) Missing docblock for function get_cache
(#45) Expected 1 space before opening brace; found 0
(#46) Variable "cc_cache" must not contain underscores.
(#47) Variable "cc_cache" must not contain underscores.
(#48) Variable "cache_valid" must not contain underscores.
(#49) Expected "if (...) {\n"; found "if(...){\n"
(#49) Expected 1 space after IF keyword; 0 found
(#49) Expected 1 space after closing parenthesis; found 0
(#51) Expected "if (...) {\n"; found "if(...){\n"
(#51) Expected 1 space after IF keyword; 0 found
(#51) Expected 0 spaces after opening bracket; 1 found
(#51) Expected 1 space after closing parenthesis; found 0
blocks/analyticswidget/classes/output/mobile.php
(#1) Moodle boilerplate not found
(#16) Incorrect @package tag for class mobile. Expected block_analyticswidget, found block_deft.
(#29) Inline comments must start with a capital letter, digit or 3-dots sequence
(#29) This comment is 100% valid code; is this commented out code?
(#29) No space found before comment text; expected "// {"appcustomurlscheme":"moodlemobile","appid":"com.moodle.moodlemobile","appisdesktop":"0","appismobile":"1","appiswide":"0","applang":"en-us","appplatform":"browser","appversioncode":"42000","appversionname":"4.2.0","blockid":"20","contextlevel":"user","instanceid":"2","userid":"2"}" but found "//{"appcustomurlscheme":"moodlemobile","appid":"com.moodle.moodlemobile","appisdesktop":"0","appismobile":"1","appiswide":"0","applang":"en-us","appplatform":"browser","appversioncode":"42000","appversionname":"4.2.0","blockid":"20","contextlevel":"user","instanceid":"2","userid":"2"}"
(#30) Missing docblock for function mobile_view
(#32) Expected "if (...) {\n"; found "if(...) {\n"
(#32) Expected 1 space after IF keyword; 0 found
(#32) Expected 0 spaces before closing bracket; 1 found
(#41) Expected at least 1 space before "="; 0 found
(#41) Expected at least 1 space after "="; 0 found
(#41) Expected 1 space before "="; 0 found
(#41) Expected 1 space after "="; 0 found
(#51) Expected at least 1 space before "."; 0 found
(#51) Expected at least 1 space after "."; 0 found
(#51) Expected at least 1 space before "."; 0 found
(#51) Expected at least 1 space after "."; 0 found
(#59) Expected no space between "]" and the comma. Found: 1 space
(#63) Whitespace found at end of line
(#64) Expected 1 newline at end of file; 0 found
(#64) The closing brace for the class must go on the next line after the body
blocks/analyticswidget/classes/output/renderer.php
(#38) Opening brace must not be followed by a blank line
(#47) Expected 0 spaces after "("; 1 found
(#47) Expected 0 spaces after opening parenthesis; 1 found
blocks/analyticswidget/classes/privacy/provider.php
(#16) Boilerplate comment must be followed by a single blank line or end of file
(#36) Opening brace must not be followed by a blank line
(#44) There must not be a space before the colon in a return type declaration
blocks/analyticswidget/classes/widget.php
(#40) Opening brace must not be followed by a blank line
(#46) Property name "$_userid" should not be prefixed with an underscore to indicate visibility
(#52) Member variable "mobile_view" must not contain underscores.
(#58) Variable "mobile_view" must not contain underscores.
(#59) Opening brace should be on the same line as the declaration
(#64) Variable "mobile_view" must not contain underscores.
(#73) Opening brace should be on the same line as the declaration
(#87) Blank line found at start of control structure
(#101) Opening brace should be on the same line as the declaration
(#121) Blank line found at start of control structure
(#138) Short array syntax must be used to define arrays
(#147) Opening brace should be on the same line as the declaration
(#153) Short array syntax must be used to define arrays
(#168) Opening brace should be on the same line as the declaration
(#174) Variable "studingin_all" must not contain underscores.
(#175) Variable "studingin_active" must not contain underscores.
(#180) Blank line found at start of control structure
(#182) Variable "studingin_all" must not contain underscores.
(#182) Variable "studingin_active" must not contain underscores.
(#182) Variable "studingin_active" must not contain underscores.
(#199) Short array syntax must be used to define arrays
(#202) Short array syntax must be used to define arrays
(#206) Short array syntax must be used to define arrays
(#215) Opening brace should be on the same line as the declaration
(#228) Each class must be in a file by itself
(#229) Opening brace must not be followed by a blank line
(#234) Variable "mobile_view" must not contain underscores.
blocks/analyticswidget/classes/widgets/my/course_stats.php
(#31) Opening brace must not be followed by a blank line
(#52) Member variable "active_courses" must not contain underscores.
(#57) Member variable "studing_in" must not contain underscores.
(#82) Variable "mobile_view" must not contain underscores.
(#82) Incorrect spacing between argument "$mobile_view" and equals sign; expected 1 but found 0
(#84) Short array syntax must be used to define arrays
(#94) Expected "if (...) {\n"; found "if(...){\n"
(#94) Expected 1 space after IF keyword; 0 found
(#94) Expected at least 1 space before "."; 0 found
(#94) Expected at least 1 space after "."; 0 found
(#94) Expected 1 space after closing parenthesis; found 0
(#99) Expected "if (...) {\n"; found "if(...){\n"
(#99) Expected 1 space after IF keyword; 0 found
(#99) Variable "mobile_view" must not contain underscores.
(#99) Expected 1 space after closing parenthesis; found 0
(#111) Short array syntax must be used to define arrays
(#112) Short array syntax must be used to define arrays
(#113) Short array syntax must be used to define arrays
(#113) There should be a comma after the last array item in a multi-line array.
(#136) Short array syntax must be used to define arrays
(#137) Short array syntax must be used to define arrays
(#138) Short array syntax must be used to define arrays
(#139) There should be a comma after the last array item in a multi-line array.
blocks/analyticswidget/classes/widgets/teacher/activity_stats.php
(#31) Opening brace must not be followed by a blank line
(#55) Variable "mobile_view" must not contain underscores.
(#55) Incorrect spacing between argument "$mobile_view" and equals sign; expected 1 but found 0
(#58) Short array syntax must be used to define arrays
(#69) Expected "if (...) {\n"; found "if(...){\n"
(#69) Expected 1 space after IF keyword; 0 found
(#69) Variable "mobile_view" must not contain underscores.
(#69) Expected 1 space after closing parenthesis; found 0
(#70) Whitespace found at end of line
blocks/analyticswidget/classes/widgets/teacher/course_stats.php
(#31) Opening brace must not be followed by a blank line
(#55) Variable "mobile_view" must not contain underscores.
(#55) Incorrect spacing between argument "$mobile_view" and equals sign; expected 1 but found 0
(#58) Short array syntax must be used to define arrays
(#63) Expected "if (...) {\n"; found "if(...){\n"
(#63) Expected 1 space after IF keyword; 0 found
(#63) Variable "mobile_view" must not contain underscores.
(#63) Expected 1 space after closing parenthesis; found 0
blocks/analyticswidget/classes/widgets/teacher/user_stats.php
(#31) Opening brace must not be followed by a blank line
(#55) Variable "mobile_view" must not contain underscores.
(#55) Incorrect spacing between argument "$mobile_view" and equals sign; expected 1 but found 0
(#58) Short array syntax must be used to define arrays
(#69) Expected "if (...) {\n"; found "if(...){\n"
(#69) Expected 1 space after IF keyword; 0 found
(#69) Variable "mobile_view" must not contain underscores.
(#69) Expected 1 space after closing parenthesis; found 0
blocks/analyticswidget/db/access.php
(#28) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#32) Short array syntax must be used to define arrays
(#33) There should be a comma after the last array item in a multi-line array.
(#36) There should be a comma after the last array item in a multi-line array.
(#39) Short array syntax must be used to define arrays
(#44) Short array syntax must be used to define arrays
(#46) There should be a comma after the last array item in a multi-line array.
(#49) There should be a comma after the last array item in a multi-line array.
blocks/analyticswidget/db/caches.php
(#36) There should be a comma after the last array item in a multi-line array.
blocks/analyticswidget/db/install.php
(#38) Short array syntax must be used to define arrays
(#39) Short array syntax must be used to define arrays
blocks/analyticswidget/db/mobile.php
(#1) Missing @copyright tag
(#1) Missing @license tag
(#1) Missing docblock for file mobile.php
(#1) Moodle boilerplate not found
(#26) Whitespace found at end of line
(#27) Whitespace found at end of line
(#30) Expected 1 newline at end of file; 0 found
blocks/analyticswidget/lang/en/block_analyticswidget.php
(#31) The string key "aw_teacher_level" is not in the correct order, it should be before "teacher_level"
(#35) The string key "teacher_activity_stats" is not in the correct order, it should be before "teacher_user_stats"
(#36) The string key "aw_teacher_stats_user" is not in the correct order, it should be before "teacher_activity_stats"
(#37) The string key "aw_teacher_stats_activity" is not in the correct order, it should be before "aw_teacher_stats_user"
(#39) The string key "active" is not in the correct order, it should be before "aw_teacher_stats_course"
(#41) The string key "completed" is not in the correct order, it should be before "inactive"
(#44) The string key "my_course_stats" is not in the correct order, it should be before "my_level"
(#45) The string key "aw_my_stats" is not in the correct order, it should be before "my_course_stats"
(#47) The string key "my_current" is not in the correct order, it should be before "my_so_far"
(#51) The string key "student_role" is not in the correct order, it should be before "teacher_role"
(#52) The string key "as_student" is not in the correct order, it should be before "student_role"
(#54) The string key "mobile_view" is not in the correct order, it should be before "studying_in"
(#55) The string key "cachedef_awstat" is not in the correct order, it should be before "mobile_view"
(#56) The string key "aw_promo" is not in the correct order, it should be before "cachedef_awstat"
(#57) Unexpected string end, it should be a line feed after a semicolon
(#57) Expected 1 newline at end of file; 0 found
blocks/analyticswidget/settings.php
(#28) Blank line found at start of control structure
(#48) Whitespace found at end of line
(#79) Whitespace found at end of line
(#93) Blank line found at end of control structure

Javascript coding style problems

(0 errors, 0 warnings)

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


CSS problems

(0 errors, 2 warnings)

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

blocks/analyticswidget/styles.css
(#74) Unexpected unit (length-zero-no-unit)
(#82) Unexpected unit (length-zero-no-unit)

PHPDocs style problems

(6 errors, 0 warnings)

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

blocks/analyticswidget/classes/widget.php
(#56) Phpdocs for function widget::__construct has incomplete parameters list
(#231) Phpdocs for function widgetfacade::export_html has incomplete parameters list
blocks/analyticswidget/classes/widgets/my/course_stats.php
(#77) Phpdocs for function course_stats::export_html has incomplete parameters list
blocks/analyticswidget/classes/widgets/teacher/activity_stats.php
(#51) Phpdocs for function activity_stats::export_html has incomplete parameters list
blocks/analyticswidget/classes/widgets/teacher/course_stats.php
(#51) Phpdocs for function course_stats::export_html has incomplete parameters list
blocks/analyticswidget/classes/widgets/teacher/user_stats.php
(#51) Phpdocs for function user_stats::export_html has incomplete parameters list

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, 9 warnings)

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

blocks/analyticswidget/templates/mobile_widget.mustache
(#1) HTML Validation error, line 25: Element “style” not allowed as child of element “body” in this context. (Suppressing further errors from this subtree.) (v></div><style>.aw_s)
blocks/analyticswidget/templates/my/course_stats.mustache
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( labels: ["Active","In-Active"],
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( data: [1,0],
(#1) ESLint error [no-unused-vars]: 'chart' is assigned a value but never used. ( chart = new Chart(chartDiv, config);
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( labels: ["Active","Completed","In Progress"],
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( labels: ["Active","Completed","In Progress"],
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( data: [1,0,1],
(#1) ESLint warning [comma-spacing]: A space is required after ','. ( data: [1,0,1],
(#1) ESLint error [no-unused-vars]: 'chart' is assigned a value but never used. ( chart = new Chart(chartDiv, config);
blocks/analyticswidget/templates/my/mobile/course_stats.mustache
(#1) HTML Validation info, line 21: Attribute “[data]” is not serializable as XML 1.0. (nt> <core-chart type="bar" [data]="[1,0,1]" [labels]='["Active","Completed","In Progress"]' height="100" ></core)
(#1) HTML Validation info, line 21: Attribute “[labels]” is not serializable as XML 1.0. (nt> <core-chart type="bar" [data]="[1,0,1]" [labels]='["Active","Completed","In Progress"]' height="100" ></core)

Gherkin .feature problems

(0 errors, 0 warnings)

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