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

(12 errors, 2 warnings)

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

blocks/stash/classes/external/trade_items_exporter.php
(#87) Expected 1 space after "!=="; 2 found
blocks/stash/classes/form/integer.php
(#63) Inline comments must end in full-stops, exclamation marks, or question marks
(#63) This comment is 45% valid code; is this commented out code?
(#79) method name "block_stash_form_integer::_createElements" must be in lower-case letters only
(#79) Visibility must be declared on method "_createElements"
(#111) method name "block_stash_form_integer::exportValue" must be in lower-case letters only
(#111) Visibility must be declared on method "exportValue"
(#111) Variable "submitValues" must be all lower-case
(#113) Variable "submitValues" must be all lower-case
(#117) Variable "submitValues" must be all lower-case
(#128) method name "block_stash_form_integer::onQuickFormEvent" must be in lower-case letters only
(#128) Visibility must be declared on method "onQuickFormEvent"
blocks/stash/db/upgrade.php
(#200) Line indented incorrectly; expected 4 spaces, found 5
(#226) Closing brace indented incorrectly; expected 5 spaces, found 4

Javascript coding style problems

(0 errors, 34 warnings)

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

blocks/stash/amd/src/dialogue-base.js
(#39) Expected catch,fail() or return (promise/catch-or-return)
(#39) Each then() should return a value or throw (promise/always-return)
(#89) Expected catch,fail() or return (promise/catch-or-return)
(#135) Expected catch,fail() or return (promise/catch-or-return)
blocks/stash/amd/src/drop-snippet-ui.js
(#51) Unexpected @return tag; function has no return statement. (valid-jsdoc)
(#90) Unexpected @return tag; function has no return statement. (valid-jsdoc)
(#115) Unexpected @return tag; function has no return statement. (valid-jsdoc)
(#123) Statement inside of curly braces should be on next line. (brace-style)
(#123) This line has 3 statements. Maximum allowed is 2. (max-statements-per-line)
(#123) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#129) Unexpected @return tag; function has no return statement. (valid-jsdoc)
blocks/stash/amd/src/item-dialogue.js
(#53) Expected catch,fail() or return (promise/catch-or-return)
blocks/stash/amd/src/stash-area.js
(#65) Multiple spaces found before '// A hacky sep...'. (no-multi-spaces)
(#92) Expected catch,fail() or return (promise/catch-or-return)
blocks/stash/amd/src/trade-area.js
(#132) Unexpected @return tag; function has no return statement. (valid-jsdoc)
blocks/stash/amd/src/trade-item-dialogue.js
(#30) Expected JSDoc for 'courseid' but found 'itemId'. (valid-jsdoc)
(#30) Missing JSDoc for parameter 'type'. (valid-jsdoc)
(#30) Missing JSDoc for parameter 'title'. (valid-jsdoc)
(#62) Expected catch,fail() or return (promise/catch-or-return)
blocks/stash/amd/src/trade-snippet-dialogue.js
(#71) Expected catch,fail() or return (promise/catch-or-return)
blocks/stash/amd/src/trade.js
(#35) Expected JSDoc for 'tradedata' but found 'dropdata'. (valid-jsdoc)
(#63) 'index' used outside of binding context. (block-scoped-var)
(#65) 'userItem' used outside of binding context. (block-scoped-var)
(#65) 'index' used outside of binding context. (block-scoped-var)
(#65) 'index' used outside of binding context. (block-scoped-var)
(#69) 'userItem' used outside of binding context. (block-scoped-var)
(#73) 'index' is already defined. (no-redeclare)
(#73) 'index' used outside of binding context. (block-scoped-var)
(#74) 'userItem' is already defined. (no-redeclare)
(#74) 'userItem' used outside of binding context. (block-scoped-var)
(#74) 'index' used outside of binding context. (block-scoped-var)
(#74) 'index' used outside of binding context. (block-scoped-var)
(#78) 'userItem' used outside of binding context. (block-scoped-var)
blocks/stash/amd/src/user-item.js
(#28) Missing JSDoc for parameter 'item'. (valid-jsdoc)

CSS problems

(2 errors, 0 warnings)

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

blocks/stash/styles.css
(#4) Unexpected duplicate "display" (declaration-block-no-duplicate-properties)
(#5) Unexpected duplicate "display" (declaration-block-no-duplicate-properties)

PHPDocs style problems

(121 errors, 0 warnings)

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

blocks/stash/backup/moodle2/backup_stash_block_task.class.php
(#67) Phpdocs for function backup_stash_block_task::encode_content_links has incomplete parameters list
blocks/stash/backup/moodle2/restore_stash_stepslib.php
(#85) Phpdocs for function restore_stash_block_structure_step::process_block has incomplete parameters list
(#92) Phpdocs for function restore_stash_block_structure_step::process_block_stash has incomplete parameters list
(#110) Phpdocs for function restore_stash_block_structure_step::process_block_stash_item has incomplete parameters list
(#123) Phpdocs for function restore_stash_block_structure_step::process_block_stash_drop has incomplete parameters list
(#142) Phpdocs for function restore_stash_block_structure_step::process_pickup has incomplete parameters list
(#154) Phpdocs for function restore_stash_block_structure_step::process_useritem has incomplete parameters list
(#166) Phpdocs for function restore_stash_block_structure_step::process_block_stash_trade has incomplete parameters list
(#185) Phpdocs for function restore_stash_block_structure_step::process_block_stash_tradeitems has incomplete parameters list
blocks/stash/block_stash.php
(#78) Function block_stash::specialization is not documented
blocks/stash/classes/drop.php
(#48) Function drop::define_properties is not documented
(#46) Constant drop::TABLE is not documented
blocks/stash/classes/drop_pickup.php
(#41) Function drop_pickup::define_properties is not documented
(#39) Constant drop_pickup::TABLE is not documented
blocks/stash/classes/drop_snippet_restore_decode_rule.php
(#40) Phpdocs for function drop_snippet_restore_decode_rule::__construct has incomplete parameters list
blocks/stash/classes/external.php
(#52) Package core_competency is not valid
blocks/stash/classes/external/drop_exporter.php
(#41) Function drop_exporter::define_class is not documented
(#45) Function drop_exporter::define_related is not documented
(#49) Function drop_exporter::define_other_properties is not documented
(#63) Function drop_exporter::get_other_values is not documented
blocks/stash/classes/external/exporter.php
(#50) Class exporter is not documented
blocks/stash/classes/external/item_exporter.php
(#40) Function item_exporter::define_class is not documented
(#44) Function item_exporter::define_related is not documented
(#48) Function item_exporter::define_other_properties is not documented
(#59) Function item_exporter::get_other_values is not documented
blocks/stash/classes/external/items_exporter.php
(#42) Function items_exporter::define_related is not documented
(#48) Function items_exporter::define_properties is not documented
(#57) Function items_exporter::get_other_values is not documented
blocks/stash/classes/external/trade_exporter.php
(#40) Function trade_exporter::define_class is not documented
(#44) Function trade_exporter::define_related is not documented
blocks/stash/classes/external/trade_items_exporter.php
(#42) Function trade_items_exporter::define_class is not documented
(#46) Function trade_items_exporter::define_related is not documented
(#54) Function trade_items_exporter::define_other_properties is not documented
(#77) Function trade_items_exporter::get_other_values is not documented
blocks/stash/classes/external/trade_summary_exporter.php
(#45) Function trade_summary_exporter::define_related is not documented
(#53) Function trade_summary_exporter::define_properties is not documented
(#66) Function trade_summary_exporter::get_other_values is not documented
blocks/stash/classes/external/user_item_exporter.php
(#40) Function user_item_exporter::define_class is not documented
blocks/stash/classes/external/user_item_summary_exporter.php
(#45) Function user_item_summary_exporter::define_related is not documented
(#53) Function user_item_summary_exporter::define_properties is not documented
(#64) Function user_item_summary_exporter::get_other_values is not documented
blocks/stash/classes/form/drop.php
(#49) Function drop::definition is not documented
(#43) Variable drop::$persistentclass is not documented
(#45) Variable drop::$fieldstoremove is not documented
(#47) Variable drop::$foreignfields is not documented
blocks/stash/classes/form/integer.php
(#66) Phpdocs for function block_stash_form_integer::block_stash_form_integer has incomplete parameters list
(#107) Phpdocs for function block_stash_form_integer::exportValue has incomplete parameters list
blocks/stash/classes/form/item.php
(#18) File-level phpdocs block is not found
(#28) Class item is not documented
(#30) Variable item::$persistentclass is not documented
(#32) Variable item::$fieldstoremove is not documented
(#34) Variable item::$foreignfields is not documented
(#28) Package is not specified for class item. It is also not specified in file-level phpdocs
blocks/stash/classes/form/persistent.php
(#20) Package tool_lp is not valid
blocks/stash/classes/form/trade.php
(#18) File-level phpdocs block is not found
(#26) Class trade is not documented
(#28) Variable trade::$persistentclass is not documented
(#30) Variable trade::$fieldstoremove is not documented
(#32) Variable trade::$foreignfields is not documented
(#26) Package is not specified for class trade. It is also not specified in file-level phpdocs
blocks/stash/classes/form/tradeitem.php
(#18) File-level phpdocs block is not found
(#26) Class tradeitem is not documented
(#28) Variable tradeitem::$persistentclass is not documented
(#30) Variable tradeitem::$fieldstoremove is not documented
(#26) Package is not specified for class tradeitem. It is also not specified in file-level phpdocs
blocks/stash/classes/item.php
(#41) Function item::define_properties is not documented
(#39) Constant item::TABLE is not documented
blocks/stash/classes/manager.php
(#886) Function manager::get_trade_item is not documented
(#892) Function manager::get_trade_items is not documented
(#898) Function manager::get_full_trade_items_data is not documented
(#931) Function manager::do_trade is not documented
(#969) Function manager::user_has_item_to_trade is not documented
(#420) Phpdocs for function manager::get_drop has incomplete parameters list
blocks/stash/classes/output/block_content.php
(#35) Class block_content is not documented
(#39) Function block_content::__construct is not documented
(#43) Function block_content::export_for_template is not documented
(#37) Variable block_content::$manager is not documented
blocks/stash/classes/output/drop.php
(#59) Phpdocs for function drop::__construct has incomplete parameters list
blocks/stash/classes/output/drop_image.php
(#55) Phpdocs for function drop_image::__construct has incomplete parameters list
blocks/stash/classes/output/drops_table.php
(#59) Phpdocs for function drops_table::__construct has incomplete parameters list
blocks/stash/classes/output/fulltrade.php
(#50) Variable fulltrade::$tradeitems is not documented
(#52) Variable fulltrade::$courseid is not documented
(#54) Variable fulltrade::$stashid is not documented
(#56) Variable fulltrade::$gainhelp is not documented
(#58) Variable fulltrade::$losshelp is not documented
(#60) Variable fulltrade::$titlehelp is not documented
(#65) Phpdocs for function fulltrade::__construct has incomplete parameters list
blocks/stash/classes/output/item.php
(#54) Phpdocs for function item::__construct has incomplete parameters list
blocks/stash/classes/output/items_table.php
(#59) Phpdocs for function items_table::__construct has incomplete parameters list
blocks/stash/classes/output/renderer.php
(#179) Function renderer::render_block_content is not documented
(#184) Function renderer::render_drop_image is not documented
(#189) Function renderer::render_drop_text is not documented
(#194) Function renderer::render_item_xsmall is not documented
(#199) Function renderer::render_trade is not documented
(#204) Function renderer::render_settings_page is not documented
(#209) Function renderer::render_user_inventory is not documented
(#214) Function renderer::render_trade_form is not documented
(#51) Phpdocs for function renderer::drop_snippet_ui has incomplete parameters list
blocks/stash/classes/output/report_table.php
(#62) Phpdocs for function report_table::__construct has incomplete parameters list
blocks/stash/classes/output/trade.php
(#58) Phpdocs for function trade::__construct has incomplete parameters list
blocks/stash/classes/output/trades_table.php
(#58) Phpdocs for function trades_table::__construct has incomplete parameters list
blocks/stash/classes/page_helper.php
(#39) Function page_helper::setup_for_drop is not documented
(#76) Function page_helper::setup_for_item is not documented
(#106) Function page_helper::setup_for_trade is not documented
(#136) Function page_helper::setup_for_trade_item is not documented
(#166) Function page_helper::setup_for_report is not documented
blocks/stash/classes/shortcodes.php
(#50) Phpdocs for function shortcodes::drop has incomplete parameters list
(#111) Phpdocs for function shortcodes::trade has incomplete parameters list
blocks/stash/classes/stash.php
(#41) Function stash::define_properties is not documented
(#39) Constant stash::TABLE is not documented
(#152) Phpdocs for function stash::get_by_tradeid has incomplete parameters list
blocks/stash/classes/trade.php
(#48) Function trade::define_properties is not documented
(#163) Function trade::get_full_trade_items_list is not documented
(#46) Constant trade::TABLE is not documented
(#112) Phpdocs for function trade::is_trade_in_stash has incomplete parameters list
blocks/stash/classes/tradeitems.php
(#41) Function tradeitems::define_properties is not documented
(#39) Constant tradeitems::TABLE is not documented
blocks/stash/classes/user_item.php
(#41) Function user_item::define_properties is not documented
(#39) Constant user_item::TABLE is not documented
blocks/stash/edit_form.php
(#34) Function block_stash_edit_form::specific_definition is not documented
(#45) Function block_stash_edit_form::set_data is not documented

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

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

blocks/stash/templates/drop_image.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 2: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (ad><body><div id="" style="display: inline;"> <)
blocks/stash/templates/drop_snippet_dialogue.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/drop_snippet_ui.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/drop_text.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 2: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (ad><body><div id="" style="display: inline;"> <)
blocks/stash/templates/fullpage_help.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation info, line 4: Empty heading. (> <h3></h3>)
blocks/stash/templates/item.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/item_detail.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/item_small.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/item_xsmall.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/main_content.mustache
(#1) Example context missing (@template section not found.)
(#1) ESLint error [no-unused-vars]: 'Area' is assigned a value but never used. ( var Area = new StashArea('#stash-area-'); ), Line: 6 Column: 9
blocks/stash/templates/trade.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 2: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (ad><body><div id="" style="display: inline;"> <)
(#1) HTML Validation error, line 17: The “center” element is obsolete. Use CSS instead. ( <center><butto)
blocks/stash/templates/trade_add_item_detail.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 3: Stray start tag “tr”. (d><body><tr class="block-stash-trade-item" data-id=""> <)
(#1) HTML Validation error, line 4: Stray start tag “td”. (d=""> <td style="width: 70%;"><div c)
(#1) HTML Validation error, line 9: Stray end tag “td”. (></div> </td> <)
(#1) HTML Validation error, line 10: Stray start tag “td”. (</td> <td style="width: 20%;"> )
(#1) HTML Validation error, line 12: Stray end tag “td”. ("" /> </td> <)
(#1) HTML Validation error, line 13: Stray start tag “td”. (</td> <td style="width: 10%;"> )
(#1) HTML Validation error, line 15: Stray end tag “td”. (span> </td></tr>)
(#1) HTML Validation error, line 16: Stray end tag “tr”. ( </td></tr></bo)
blocks/stash/templates/trade_form.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 11: No space between attributes. ( <input type="text" class="form-control" name="title" value="" placeholder="[[tradename, block_stash]]"" /> )
(#1) HTML Validation error, line 11: Saw “"” when expecting an attribute name. Probable cause: “=” missing immediately before. ( <input type="text" class="form-control" name="title" value="" placeholder="[[tradename, block_stash]]"" /> )
(#1) HTML Validation info, line 11: Attribute “"” is not serializable as XML 1.0. (_stash]]"" /> )
(#1) HTML Validation error, line 11: Attribute “"” not allowed on element “input” at this point. (_stash]]"" /> )
(#1) HTML Validation error, line 19: Element “legend” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.) ( <legend>[[gain)
(#1) HTML Validation error, line 51: Element “legend” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.) ( <legend>[[loss)
blocks/stash/templates/trade_item_picker.mustache
(#1) Example context missing (@template section not found.)
(#1) ESLint warning [promise/catch-or-return]: Expected catch,fail() or return ( Templates.render(templatename, data).then(function(html, js) { ), Line: 34 Column: 9
(#1) ESLint warning [promise/always-return]: Each then() should return a value or throw ( Templates.render(templatename, data).then(function(html, js) { ), Line: 34 Column: 51
(#1) ESLint error [no-unused-vars]: 'js' is defined but never used. ( Templates.render(templatename, data).then(function(html, js) { ), Line: 34 Column: 66
blocks/stash/templates/trade_loss_item_detail.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 3: Stray start tag “tr”. (d><body><tr class="block-stash-trade-item" data-id=""> <)
(#1) HTML Validation error, line 4: Stray start tag “td”. (d=""> <td style="width: 70%;"><div c)
(#1) HTML Validation error, line 9: Stray end tag “td”. (></div> </td> <)
(#1) HTML Validation error, line 10: Stray start tag “td”. (</td> <td style="width: 20%;"> )
(#1) HTML Validation error, line 12: Stray end tag “td”. ("" /> </td> <)
(#1) HTML Validation error, line 13: Stray start tag “td”. (</td> <td style="width: 10%;"> )
(#1) HTML Validation error, line 15: Stray end tag “td”. (span> </td></tr>)
(#1) HTML Validation error, line 16: Stray end tag “tr”. ( </td></tr></bo)
blocks/stash/templates/trade_snippet_dialogue.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation error, line 3: Bad value “” for attribute “id” on element “div”: An ID must not be the empty string. (gue"> <div id="" style="display: inline;"> )
(#1) HTML Validation error, line 19: Stray end tag “div”. ( </div></div> <)
(#1) HTML Validation error, line 29: Stray end tag “div”. ( </div></div></b)
(#1) ESLint error [no-trailing-spaces]: Trailing spaces not allowed. ( ), Line: 5 Column: 1
blocks/stash/templates/trade_success.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/tradeitem_detail.mustache
(#1) Example context missing (@template section not found.)
blocks/stash/templates/user_item.mustache
(#1) Example context missing (@template section not found.)
(#1) Template produced no content
blocks/stash/templates/user_item_small.mustache
(#1) Example context missing (@template section not found.)