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

(139 errors, 23 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.
(#37) Variable "course_context" must not contain underscores.
(#38) Variable "course_context" must not contain underscores.
(#43) Inline comments must end in full-stops, exclamation marks, or question marks
(#45) Variable "top_category_id_for_course" must not contain underscores.
(#45) Variable "course_context" must not contain underscores.
(#46) Variable "category_id" must not contain underscores.
(#46) Variable "top_category_id_for_course" must not contain underscores.
(#48) Inline comments must end in full-stops, exclamation marks, or question marks
(#49) Variable "top_category_id_for_course" must not contain underscores.
(#51) Variable "category_id" must not contain underscores.
(#56) Variable "question_data" must not contain underscores.
(#57) Variable "answer_array" must not contain underscores.
(#57) Variable "question_data" must not contain underscores.
(#59) Variable "question_obj" must not contain underscores.
(#60) Variable "question_obj" must not contain underscores.
(#60) Variable "category_id" must not contain underscores.
(#61) Variable "question_obj" must not contain underscores.
(#62) Variable "question_obj" must not contain underscores.
(#65) Variable "category_id" must not contain underscores.
(#69) Whitespace found at end of line
(#81) Variable "answer_array" must not contain underscores.
(#82) Whitespace found at end of line
(#91) Whitespace found at end of line
(#94) Variable "answer_array" must not contain underscores.
(#113) Variable "answer_array" must not contain underscores.
(#116) Variable "question_data" must not contain underscores.
(#121) Variable "question_obj" must not contain underscores.
(#131) 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
(#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
(#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 290 characters
(#93) Variable "qtype_prompts" must not contain underscores.
(#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
(#119) Line exceeds maximum limit of 180 characters; contains 196 characters
(#141) Whitespace found at end of line
(#154) Whitespace found at end of line
(#161) Visibility must be declared on method "remove_blank_questions"
(#166) Whitespace found at end of line
(#177) 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
(#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
(#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
(#73) Inline comments must end in full-stops, exclamation marks, or question marks
(#77) Line indented incorrectly; expected at least 4 spaces, found 2
(#82) Line indented incorrectly; expected at least 4 spaces, found 2
(#83) Whitespace found at end of line
(#85) Inline comments must end in full-stops, exclamation marks, or question marks
(#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
(#89) Line indented incorrectly; expected at least 4 spaces, found 2
(#91) Line indented incorrectly; expected at least 4 spaces, found 2
(#92) Line indented incorrectly; expected at least 4 spaces, found 2
(#94) Line indented incorrectly; expected at least 4 spaces, found 2
(#95) Line indented incorrectly; expected at least 4 spaces, found 2
(#97) Line indented incorrectly; expected 4 spaces, found 2
(#98) Line indented incorrectly; expected at least 8 spaces, found 4
(#99) Line indented incorrectly; expected 4 spaces, found 2
(#101) Line indented incorrectly; expected 4 spaces, found 2
(#101) Variable "question_data" must not contain underscores.
(#102) Line indented incorrectly; expected at least 8 spaces, found 4
(#104) Line indented incorrectly; expected at least 8 spaces, found 6
(#105) Variable "question_data" must not contain underscores.
(#106) Variable "question_data" must not contain underscores.
(#107) Line indented incorrectly; expected at least 12 spaces, found 10
(#109) Line indented incorrectly; expected at least 16 spaces, found 14
(#109) Line exceeds 132 characters; contains 164 characters
(#112) Variable "question_data" must not contain underscores.
(#112) Variable "question_data" must not contain underscores.
(#113) Line indented incorrectly; expected at least 16 spaces, found 14
(#113) Line exceeds 132 characters; contains 163 characters
(#115) Line indented incorrectly; expected at least 16 spaces, found 14
(#117) Line indented incorrectly; expected at least 12 spaces, found 10
(#119) Line indented incorrectly; expected at least 8 spaces, found 6
(#121) Line indented incorrectly; expected at least 8 spaces, found 6
(#123) Line indented incorrectly; expected at least 8 spaces, found 6
(#125) Line indented incorrectly; expected at least 8 spaces, found 4
(#126) Line indented incorrectly; expected 4 spaces, found 2
(#128) Line indented incorrectly; expected at least 4 spaces, found 2
(#128) Line exceeds maximum limit of 180 characters; contains 214 characters
(#129) Line indented incorrectly; expected at least 4 spaces, found 2
(#129) Line exceeds maximum limit of 180 characters; contains 205 characters
(#131) Line indented incorrectly; expected at least 4 spaces, found 2
(#132) Line indented incorrectly; expected at least 4 spaces, found 2
(#136) Line indented incorrectly; expected at least 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
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
(#44) 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
(#31) File must end with a newline character

Javascript coding style problems

(38 errors, 7 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)
(#27) This line has a length of 170. Maximum allowed is 132. (max-len)
(#27) Missing semicolon. (semi)
(#28) Missing semicolon. (semi)
(#29) Missing semicolon. (semi)
(#30) Missing semicolon. (semi)
(#31) Missing semicolon. (semi)
(#34) Missing semicolon. (semi)
(#36) Missing semicolon. (semi)
(#40) Missing semicolon. (semi)
(#42) Missing semicolon. (semi)
(#43) Missing semicolon. (semi)
(#44) ["questions"] is better written in dot notation. (dot-notation)
(#44) Missing semicolon. (semi)
(#45) ["questions"] is better written in dot notation. (dot-notation)
(#45) ["answers"] is better written in dot notation. (dot-notation)
(#45) Missing semicolon. (semi)
(#46) ["questions"] is better written in dot notation. (dot-notation)
(#46) ["correct"] is better written in dot notation. (dot-notation)
(#46) Missing semicolon. (semi)
(#47) Missing semicolon. (semi)
(#48) ["courseid"] is better written in dot notation. (dot-notation)
(#49) ["qtype"] is better written in dot notation. (dot-notation)
(#51) Missing semicolon. (semi)
(#52) Missing semicolon. (semi)
(#55) Missing semicolon. (semi)
(#56) Missing semicolon. (semi)
(#59) Missing semicolon. (semi)
(#60) Missing semicolon. (semi)
(#61) Missing semicolon. (semi)
(#64) Missing semicolon. (semi)
(#65) Missing semicolon. (semi)
(#67) Missing semicolon. (semi)
(#68) 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) Package is not specified for class handler. It is also not specified in file-level phpdocs
(#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
(#158) Phpdocs for function handler::remove_blank_questions has incomplete parameters list
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]