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

(179 errors, 34 warnings)

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

blocks/openai_questions/api/question.php
(#25) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
(#36) Inline comments must end in full-stops, exclamation marks, or question marks
(#37) Variable "clean_response" must not contain underscores.
(#40) There should be a comma after the last array item in a multi-line array.
(#42) Variable "question_data" must not contain underscores.
(#43) Variable "question_text" must not contain underscores.
(#44) Variable "answer_array" must not contain underscores.
(#45) Variable "question_data" must not contain underscores.
(#45) Variable "answer_key" must not contain underscores.
(#45) Variable "answer_value" must not contain underscores.
(#46) Variable "answer_array" must not contain underscores.
(#46) Variable "answer_key" must not contain underscores.
(#46) Variable "answer_value" must not contain underscores.
(#48) Variable "clean_response" must not contain underscores.
(#48) Variable "question_text" must not contain underscores.
(#48) Variable "answer_array" must not contain underscores.
(#48) Variable "question_data" must not contain underscores.
(#52) Variable "course_context" must not contain underscores.
(#52) Variable "clean_response" must not contain underscores.
(#53) Variable "course_context" must not contain underscores.
(#58) Inline comments must end in full-stops, exclamation marks, or question marks
(#60) Variable "top_category_id_for_course" must not contain underscores.
(#60) Variable "course_context" must not contain underscores.
(#61) Variable "category_id" must not contain underscores.
(#61) Variable "top_category_id_for_course" must not contain underscores.
(#63) Inline comments must end in full-stops, exclamation marks, or question marks
(#64) Variable "top_category_id_for_course" must not contain underscores.
(#66) Variable "category_id" must not contain underscores.
(#71) Variable "clean_response" must not contain underscores.
(#71) Variable "question_data" must not contain underscores.
(#72) Variable "answer_array" must not contain underscores.
(#72) Variable "question_data" must not contain underscores.
(#74) Variable "question_obj" must not contain underscores.
(#75) Variable "question_obj" must not contain underscores.
(#75) Variable "category_id" must not contain underscores.
(#76) Variable "question_obj" must not contain underscores.
(#76) Variable "clean_response" must not contain underscores.
(#77) Variable "question_obj" must not contain underscores.
(#80) Variable "category_id" must not contain underscores.
(#84) There should be a comma after the last array item in a multi-line array.
(#84) Whitespace found at end of line
(#88) There should be a comma after the last array item in a multi-line array.
(#94) Variable "clean_response" must not contain underscores.
(#96) Variable "answer_array" must not contain underscores.
(#97) Whitespace found at end of line
(#98) Short array syntax must be used to define arrays
(#102) Short array syntax must be used to define arrays
(#106) Whitespace found at end of line
(#109) Variable "answer_array" must not contain underscores.
(#128) Variable "answer_array" must not contain underscores.
(#131) Variable "question_data" must not contain underscores.
(#136) Variable "clean_response" must not contain underscores.
(#136) Variable "question_obj" must not contain underscores.
(#144) Variable "clean_response" must not contain underscores.
(#144) There should be a comma after the last array item in a multi-line array.
(#145) There should be a comma after the last array item in a multi-line array.
(#146) File must end with a newline character
blocks/openai_questions/block_openai_questions.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#34) global $PAGE cannot be used in block classes. Use $this->page.
(#45) Expected 1 space after "="; 2 found
(#46) Whitespace found at end of line
(#47) Whitespace found at end of line
(#48) Whitespace found at end of line
(#54) Opening brace must be the last content on the line
(#54) Closing brace must be on a line by itself
(#57) Short array syntax must be used to define arrays
(#59) File must end with a newline character
blocks/openai_questions/classes/forms/generate.php
(#4) Line 3 of the opening comment must start "// Moodle is free software: you can redistribute it and/or modify".
(#5) Line 4 of the opening comment must start "// it under the terms of the GNU General Public License as published by".
(#6) Line 5 of the opening comment must start "// the Free Software Foundation, either version 3 of the License, or".
(#7) Line 6 of the opening comment must start "// (at your option) any later version.".
(#9) Line 8 of the opening comment must start "// Moodle is distributed in the hope that it will be useful,".
(#10) Line 9 of the opening comment must start "// but WITHOUT ANY WARRANTY; without even the implied warranty of".
(#11) Line 10 of the opening comment must start "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the".
(#12) Line 11 of the opening comment must start "// GNU General Public License for more details.".
(#14) Line 13 of the opening comment must start "// You should have received a copy of the GNU General Public License".
(#15) Line 14 of the opening comment must start "// along with Moodle. If not, see <http://www.gnu.org/licenses/>.".
(#31) Whitespace found at end of line
(#34) Commas (,) must be followed by white space.
(#34) Line exceeds 132 characters; contains 142 characters
(#63) File must end with a newline character
blocks/openai_questions/classes/handler.php
(#19) Inline doc block comments are not allowed; use "// Comment." instead
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#35) Visibility must be declared on method "__construct"
(#43) Whitespace found at end of line
(#47) Variable "number_of_questions" must not contain underscores.
(#48) Variable "number_of_questions" must not contain underscores.
(#49) Variable "number_of_questions" must not contain underscores.
(#49) Line exceeds 132 characters; contains 158 characters
(#60) Usage of ELSEIF not allowed; use ELSE IF instead
(#62) Line exceeds maximum limit of 180 characters; contains 196 characters
(#65) Line exceeds 132 characters; contains 139 characters
(#79) Variable "number_of_questions" must not contain underscores.
(#80) Variable "qtype_prompts" must not contain underscores.
(#81) Line exceeds maximum limit of 180 characters; contains 350 characters
(#82) Line exceeds maximum limit of 180 characters; contains 295 characters
(#83) Line exceeds maximum limit of 180 characters; contains 563 characters
(#83) There should be a comma after the last array item in a multi-line array.
(#87) Line exceeds maximum limit of 180 characters; contains 205 characters
(#89) Whitespace found at end of line
(#90) Line exceeds maximum limit of 180 characters; contains 536 characters
(#92) Line exceeds maximum limit of 180 characters; contains 322 characters
(#93) Variable "qtype_prompts" must not contain underscores.
(#93) There should be a comma after the last array item in a multi-line array.
(#97) Line exceeds 132 characters; contains 146 characters
(#104) Line exceeds 132 characters; contains 133 characters
(#110) Line exceeds maximum limit of 180 characters; contains 242 characters
(#111) There should be a comma after the last array item in a multi-line array.
(#119) Line exceeds maximum limit of 180 characters; contains 196 characters
(#139) There should be a comma after the last array item in a multi-line array.
(#141) Whitespace found at end of line
(#143) Short array syntax must be used to define arrays
(#144) Short array syntax must be used to define arrays
(#146) There should be a comma after the last array item in a multi-line array.
(#154) Whitespace found at end of line
(#160) Visibility must be declared on method "clean_questions"
(#161) Variable "cleaned_questions" must not contain underscores.
(#165) Variable "cleaned_question" must not contain underscores.
(#167) There should be a comma after the last array item in a multi-line array.
(#172) Variable "cleaned_question" must not contain underscores.
(#177) Variable "cleaned_question" must not contain underscores.
(#179) Variable "cleaned_questions" must not contain underscores.
(#179) Variable "cleaned_question" must not contain underscores.
(#182) Whitespace found at end of line
blocks/openai_questions/classes/privacy/provider.php
(#40) File must end with a newline character
blocks/openai_questions/db/access.php
(#27) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#34) Short array syntax must be used to define arrays
(#38) There should be a comma after the last array item in a multi-line array.
(#41) There should be a comma after the last array item in a multi-line array.
(#43) File must end with a newline character
blocks/openai_questions/generate.php
(#32) Line exceeds 132 characters; contains 146 characters
(#33) Line exceeds 132 characters; contains 168 characters
(#37) Inline comments must end in full-stops, exclamation marks, or question marks
(#41) Line indented incorrectly; expected at least 4 spaces, found 2
(#42) Line indented incorrectly; expected at least 4 spaces, found 2
(#44) Line indented incorrectly; expected at least 4 spaces, found 2
(#47) Line exceeds 132 characters; contains 138 characters
(#47) Inline comments must end in full-stops, exclamation marks, or question marks
(#48) Short array syntax must be used to define arrays
(#52) Line indented incorrectly; expected at least 4 spaces, found 2
(#52) Line exceeds 132 characters; contains 138 characters
(#57) Line indented incorrectly; expected at least 4 spaces, found 2
(#59) Line indented incorrectly; expected at least 4 spaces, found 2
(#60) Whitespace found at end of line
(#62) Line indented incorrectly; expected at least 4 spaces, found 2
(#63) Line indented incorrectly; expected at least 4 spaces, found 2
(#66) Inline comments must end in full-stops, exclamation marks, or question marks
(#78) Line indented incorrectly; expected at least 4 spaces, found 2
(#79) Whitespace found at end of line
(#81) Inline comments must end in full-stops, exclamation marks, or question marks
(#81) Line indented incorrectly; expected at least 4 spaces, found 2
(#83) Line indented incorrectly; expected at least 4 spaces, found 2
(#84) Line indented incorrectly; expected at least 4 spaces, found 2
(#85) Line indented incorrectly; expected at least 4 spaces, found 2
(#87) Line indented incorrectly; expected at least 4 spaces, found 2
(#88) Line indented incorrectly; expected at least 4 spaces, found 2
(#90) Line indented incorrectly; expected at least 4 spaces, found 2
(#91) Line indented incorrectly; expected at least 4 spaces, found 2
(#93) Line indented incorrectly; expected 4 spaces, found 2
(#94) Line indented incorrectly; expected at least 8 spaces, found 4
(#95) Line indented incorrectly; expected 4 spaces, found 2
(#97) Line indented incorrectly; expected 4 spaces, found 2
(#97) Variable "question_data" must not contain underscores.
(#98) Line indented incorrectly; expected at least 8 spaces, found 4
(#100) Line indented incorrectly; expected at least 8 spaces, found 6
(#101) Variable "question_data" must not contain underscores.
(#102) Variable "question_data" must not contain underscores.
(#103) Line indented incorrectly; expected at least 12 spaces, found 10
(#105) Line indented incorrectly; expected at least 16 spaces, found 14
(#105) Line exceeds 132 characters; contains 164 characters
(#108) Variable "question_data" must not contain underscores.
(#108) Variable "question_data" must not contain underscores.
(#109) Line indented incorrectly; expected at least 16 spaces, found 14
(#109) Line exceeds 132 characters; contains 163 characters
(#111) Line indented incorrectly; expected at least 16 spaces, found 14
(#113) Line indented incorrectly; expected at least 12 spaces, found 10
(#115) Line indented incorrectly; expected at least 8 spaces, found 6
(#117) Line indented incorrectly; expected at least 8 spaces, found 6
(#118) Line exceeds 132 characters; contains 153 characters
(#119) Line indented incorrectly; expected at least 8 spaces, found 6
(#121) Line indented incorrectly; expected at least 8 spaces, found 4
(#122) Line indented incorrectly; expected 4 spaces, found 2
(#124) Line indented incorrectly; expected at least 4 spaces, found 2
(#124) Line exceeds maximum limit of 180 characters; contains 214 characters
(#125) Line indented incorrectly; expected at least 4 spaces, found 2
(#125) Line exceeds maximum limit of 180 characters; contains 205 characters
(#127) Line indented incorrectly; expected at least 4 spaces, found 2
(#128) Line indented incorrectly; expected at least 4 spaces, found 2
(#132) Inline comments must end in full-stops, exclamation marks, or question marks
(#132) Line indented incorrectly; expected at least 4 spaces, found 2
(#133) Line indented incorrectly; expected 4 spaces, found 2
(#134) Line indented incorrectly; expected at least 8 spaces, found 4
(#135) Line indented incorrectly; expected 4 spaces, found 2
(#137) Line indented incorrectly; expected at least 4 spaces, found 2
(#138) Line indented incorrectly; expected at least 4 spaces, found 2
(#139) Line indented incorrectly; expected at least 4 spaces, found 2
(#140) Line indented incorrectly; expected at least 4 spaces, found 2
blocks/openai_questions/lang/en/block_openai_questions.php
(#4) Line 3 of the opening comment must start "// Moodle is free software: you can redistribute it and/or modify".
(#5) Line 4 of the opening comment must start "// it under the terms of the GNU General Public License as published by".
(#6) Line 5 of the opening comment must start "// the Free Software Foundation, either version 3 of the License, or".
(#7) Line 6 of the opening comment must start "// (at your option) any later version.".
(#9) Line 8 of the opening comment must start "// Moodle is distributed in the hope that it will be useful,".
(#10) Line 9 of the opening comment must start "// but WITHOUT ANY WARRANTY; without even the implied warranty of".
(#11) Line 10 of the opening comment must start "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the".
(#12) Line 11 of the opening comment must start "// GNU General Public License for more details.".
(#14) Line 13 of the opening comment must start "// You should have received a copy of the GNU General Public License".
(#15) Line 14 of the opening comment must start "// along with Moodle. If not, see <http://www.gnu.org/licenses/>.".
(#52) File must end with a newline character
blocks/openai_questions/settings.php
(#50) File must end with a newline character
blocks/openai_questions/version.php
(#27) Inline comments must end in full-stops, exclamation marks, or question marks
(#28) Inline comments must end in full-stops, exclamation marks, or question marks
(#31) Inline comments must end in full-stops, exclamation marks, or question marks

Javascript coding style problems

(38 errors, 8 warnings)

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

blocks/openai_questions/lib.js
(#1) 'init' is assigned a value but never used. (no-unused-vars)
(#4) Missing semicolon. (semi)
(#5) Missing semicolon. (semi)
(#6) Missing semicolon. (semi)
(#9) Missing semicolon. (semi)
(#10) Missing semicolon. (semi)
(#11) Missing semicolon. (semi)
(#12) Trailing spaces not allowed. (no-trailing-spaces)
(#13) Missing semicolon. (semi)
(#20) Missing semicolon. (semi)
(#22) Missing semicolon. (semi)
(#23) Missing semicolon. (semi)
(#30) This line has a length of 174. Maximum allowed is 132. (max-len)
(#30) Missing semicolon. (semi)
(#31) Empty block statement. (no-empty)
(#32) Missing semicolon. (semi)
(#33) Missing semicolon. (semi)
(#34) Missing semicolon. (semi)
(#35) Missing semicolon. (semi)
(#38) Missing semicolon. (semi)
(#40) Missing semicolon. (semi)
(#44) Missing semicolon. (semi)
(#46) Missing semicolon. (semi)
(#47) Missing semicolon. (semi)
(#48) ["questions"] is better written in dot notation. (dot-notation)
(#48) Missing semicolon. (semi)
(#49) ["questions"] is better written in dot notation. (dot-notation)
(#49) ["answers"] is better written in dot notation. (dot-notation)
(#49) Missing semicolon. (semi)
(#50) ["questions"] is better written in dot notation. (dot-notation)
(#50) ["correct"] is better written in dot notation. (dot-notation)
(#50) Missing semicolon. (semi)
(#51) Missing semicolon. (semi)
(#52) ["courseid"] is better written in dot notation. (dot-notation)
(#53) ["qtype"] is better written in dot notation. (dot-notation)
(#55) Missing semicolon. (semi)
(#56) Missing semicolon. (semi)
(#59) Missing semicolon. (semi)
(#60) Missing semicolon. (semi)
(#63) Missing semicolon. (semi)
(#64) Missing semicolon. (semi)
(#65) Missing semicolon. (semi)
(#68) Missing semicolon. (semi)
(#69) Missing semicolon. (semi)
(#71) Missing semicolon. (semi)
(#72) Missing semicolon. (semi)

CSS problems

(2 errors, 0 warnings)

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

blocks/openai_questions/styles.css
(#18) Expected newline after "," (selector-list-comma-newline-after)
(#71) Expected indentation of 0 spaces (indentation)

PHPDocs style problems

(14 errors, 6 warnings)

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

blocks/openai_questions/block_openai_questions.php
(#27) Class block_openai_questions is not documented
(#29) Function block_openai_questions::init is not documented
(#33) Function block_openai_questions::get_content is not documented
(#54) Function block_openai_questions::has_config is not documented
(#56) Function block_openai_questions::applicable_formats is not documented
blocks/openai_questions/classes/forms/generate.php
(#28) Class generate_form is not documented
(#29) Function generate_form::definition is not documented
(#51) Function generate_form::validation is not documented
blocks/openai_questions/classes/handler.php
(#29) Class handler is not documented
(#35) Function handler::__construct is not documented
(#31) Variable handler::$sourcetext is not documented
(#32) Variable handler::$qtype is not documented
(#33) Variable handler::$apikey is not documented
(#44) Phpdocs for function handler::fetch_response has incomplete parameters list
(#74) Phpdocs for function handler::build_messages has incomplete parameters list
(#105) Phpdocs for function handler::attempt_json_conversion has incomplete parameters list
(#127) Phpdocs for function handler::make_api_request has incomplete parameters list
(#157) Phpdocs for function handler::clean_questions has incomplete parameters list
(#29) Package is not specified for class handler. It is also not specified in file-level phpdocs
blocks/openai_questions/classes/privacy/provider.php
(#27) Class provider 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]

Problems running grunt
Task "stylelint:css" failed. Use --force to continue.

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]