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

(78 errors, 31 warnings)

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

blocks/openai_chat/api/completion.php
(#25) Import statements must not begin with a leading backslash
(#27) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#45) Variable "block_id" must not contain underscores.
(#48) Inline comments must end in full-stops, exclamation marks, or question marks
(#49) Variable "instance_record" must not contain underscores.
(#49) Variable "block_id" must not contain underscores.
(#50) Variable "instance_record" must not contain underscores.
(#52) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#55) Variable "instance_record" must not contain underscores.
(#63) Variable "block_settings" must not contain underscores.
(#64) Variable "setting_names" must not contain underscores.
(#65) Whitespace found at end of line
(#66) Whitespace found at end of line
(#67) Whitespace found at end of line
(#68) Whitespace found at end of line
(#69) Whitespace found at end of line
(#70) Whitespace found at end of line
(#71) Whitespace found at end of line
(#72) Whitespace found at end of line
(#73) Whitespace found at end of line
(#74) Whitespace found at end of line
(#75) There should be a comma after the last array item in a multi-line array.
(#77) Variable "setting_names" must not contain underscores.
(#79) Variable "block_settings" must not contain underscores.
(#81) Variable "block_settings" must not contain underscores.
(#87) Variable "block_settings" must not contain underscores.
(#88) Variable "block_settings" must not contain underscores.
(#94) Variable "engine_class" must not contain underscores.
(#95) Variable "engine_class" must not contain underscores.
(#95) Variable "block_settings" must not contain underscores.
(#99) Inline comments must end in full-stops, exclamation marks, or question marks
(#102) Expected "foreach (...) {\n"; found "foreach(...) {\n"
(#102) Space found before closing bracket of FOREACH loop
(#104) Line exceeds 132 characters; contains 134 characters
blocks/openai_chat/block_openai_chat.php
(#61) Inline comments must end in full-stops, exclamation marks, or question marks
(#62) Line exceeds maximum limit of 180 characters; contains 183 characters
(#63) Line exceeds 132 characters; contains 163 characters
(#65) Inline comments must end in full-stops, exclamation marks, or question marks
(#67) Line exceeds 132 characters; contains 159 characters
(#68) Line exceeds 132 characters; contains 134 characters
(#94) Line exceeds 132 characters; contains 136 characters
blocks/openai_chat/classes/completion.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#53) Variable "block_settings" must not contain underscores.
(#54) Inline comments must end in full-stops, exclamation marks, or question marks
(#67) Inline comments must end in full-stops, exclamation marks, or question marks
(#69) Variable "block_settings" must not contain underscores.
(#79) Variable "block_settings" must not contain underscores.
(#88) Variable "default_value" must not contain underscores.
(#91) Variable "default_value" must not contain underscores.
(#98) Whitespace found at end of line
(#102) Whitespace found at end of line
(#104) Whitespace found at end of line
(#108) Line indented incorrectly; expected 8 spaces, found 12
(#108) Closing brace indented incorrectly; expected 8 spaces, found 12
(#111) File must end with a newline character
blocks/openai_chat/classes/completion/basic.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Possible useless method overriding detected
(#32) Variable "block_settings" must not contain underscores.
(#33) Variable "block_settings" must not contain underscores.
(#37) Line exceeds 132 characters; contains 133 characters
(#47) Variable "history_string" must not contain underscores.
(#48) Variable "history_string" must not contain underscores.
(#50) Variable "history_string" must not contain underscores.
(#58) Variable "history_string" must not contain underscores.
(#60) Variable "history_string" must not contain underscores.
(#62) Variable "history_string" must not contain underscores.
(#69) Variable "history_string" must not contain underscores.
(#71) Variable "history_string" must not contain underscores.
(#77) There should be a comma after the last array item in a multi-line array.
(#81) Short array syntax must be used to define arrays
(#82) Short array syntax must be used to define arrays
(#84) There should be a comma after the last array item in a multi-line array.
blocks/openai_chat/classes/completion/chat.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Possible useless method overriding detected
(#32) Variable "block_settings" must not contain underscores.
(#33) Variable "block_settings" must not contain underscores.
(#37) Line exceeds 132 characters; contains 133 characters
(#47) Variable "history_json" must not contain underscores.
(#48) Variable "history_json" must not contain underscores.
(#49) Variable "history_json" must not contain underscores.
(#51) Variable "history_json" must not contain underscores.
(#53) Variable "history_json" must not contain underscores.
(#82) There should be a comma after the last array item in a multi-line array.
(#86) Short array syntax must be used to define arrays
(#87) Short array syntax must be used to define arrays
(#89) There should be a comma after the last array item in a multi-line array.
blocks/openai_chat/db/access.php
(#27) 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/openai_chat/edit_form.php
(#25) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
(#50) Whitespace found at end of line
(#55) Whitespace found at end of line
(#77) Whitespace found at end of line
blocks/openai_chat/lib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#47) There should be a comma after the last array item in a multi-line array.
(#67) There should be a comma after the last array item in a multi-line array.
(#68) There should be a comma after the last array item in a multi-line array.
(#70) File must end with a newline character
blocks/openai_chat/settings.php
(#76) Inline comments must end in full-stops, exclamation marks, or question marks
(#79) Whitespace found at end of line

Javascript coding style problems

(48 errors, 3 warnings)

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

blocks/openai_chat/lib.js
(#1) Missing semicolon. (semi)
(#2) Missing semicolon. (semi)
(#4) 'init' is assigned a value but never used. (no-unused-vars)
(#7) Missing semicolon. (semi)
(#8) Missing semicolon. (semi)
(#9) Missing semicolon. (semi)
(#11) Missing semicolon. (semi)
(#24) Expected catch,fail,always() or return (promise/catch-or-return)
(#24) Each then() should return a value or throw (promise/always-return)
(#29) Missing semicolon. (semi)
(#37) Missing semicolon. (semi)
(#38) Trailing spaces not allowed. (no-trailing-spaces)
(#39) Missing semicolon. (semi)
(#40) Missing semicolon. (semi)
(#42) Missing semicolon. (semi)
(#45) Missing semicolon. (semi)
(#46) Missing semicolon. (semi)
(#47) Missing semicolon. (semi)
(#49) Missing semicolon. (semi)
(#50) Missing semicolon. (semi)
(#51) Missing semicolon. (semi)
(#52) Missing semicolon. (semi)
(#59) Missing semicolon. (semi)
(#60) Missing semicolon. (semi)
(#61) Missing semicolon. (semi)
(#62) Missing semicolon. (semi)
(#63) Missing semicolon. (semi)
(#75) Missing semicolon. (semi)
(#76) Missing semicolon. (semi)
(#77) Missing semicolon. (semi)
(#80) Missing semicolon. (semi)
(#82) Missing semicolon. (semi)
(#86) Each then() should return a value or throw (promise/always-return)
(#87) Expected an assignment or function call and instead saw an expression. (no-unused-expressions)
(#89) Missing semicolon. (semi)
(#91) Missing semicolon. (semi)
(#93) 'error' is defined but never used. (no-unused-vars)
(#94) Missing semicolon. (semi)
(#95) Missing semicolon. (semi)
(#96) Missing semicolon. (semi)
(#98) Missing semicolon. (semi)
(#105) Missing semicolon. (semi)
(#108) Missing semicolon. (semi)
(#111) 'userName' is not defined. (no-undef)
(#111) Missing semicolon. (semi)
(#113) 'assistantName' is not defined. (no-undef)
(#113) Missing semicolon. (semi)
(#115) Missing semicolon. (semi)
(#116) Missing semicolon. (semi)
(#118) Missing semicolon. (semi)
(#119) Missing semicolon. (semi)

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(27 errors, 7 warnings)

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

blocks/openai_chat/block_openai_chat.php
(#25) Class block_openai_chat is not documented
(#26) Function block_openai_chat::init is not documented
(#30) Function block_openai_chat::has_config is not documented
(#34) Function block_openai_chat::specialization is not documented
(#40) Function block_openai_chat::get_content is not documented
blocks/openai_chat/classes/completion.php
(#28) Class completion is not documented
(#30) Variable completion::$message is not documented
(#31) Variable completion::$history is not documented
(#33) Variable completion::$assistantname is not documented
(#34) Variable completion::$username is not documented
(#35) Variable completion::$prompt is not documented
(#36) Variable completion::$sourceoftruth is not documented
(#38) Variable completion::$apikey is not documented
(#39) Variable completion::$model is not documented
(#40) Variable completion::$temperature is not documented
(#41) Variable completion::$maxlength is not documented
(#42) Variable completion::$topp is not documented
(#43) Variable completion::$frequency is not documented
(#44) Variable completion::$presence is not documented
(#48) Phpdocs for function completion::__construct has incomplete parameters list
(#84) Phpdocs for function completion::get_setting has incomplete parameters list
(#98) Phpdocs for function completion::build_source_of_truth has incomplete parameters list
blocks/openai_chat/classes/completion/basic.php
(#30) Class basic is not documented
(#32) Function basic::__construct is not documented
(#36) Phpdocs for function basic::create_completion has incomplete parameters list
(#65) Phpdocs for function basic::make_api_call has incomplete parameters list
blocks/openai_chat/classes/completion/chat.php
(#30) Class chat is not documented
(#32) Function chat::__construct is not documented
(#36) Phpdocs for function chat::create_completion has incomplete parameters list
(#69) Phpdocs for function chat::make_api_call has incomplete parameters list
blocks/openai_chat/classes/privacy/provider.php
(#27) Class provider is not documented
blocks/openai_chat/edit_form.php
(#27) Class block_openai_chat_edit_form is not documented
(#29) Function block_openai_chat_edit_form::specific_definition is not documented
blocks/openai_chat/lib.php
(#27) Function get_models 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

(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]