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

(49 errors, 9 warnings)

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

blocks/microsoft/block_microsoft.php
(#126) global $PAGE cannot be used in block classes. Use $this->page.
(#128) global $PAGE cannot be used in block classes. Use $this->page.
(#128) global $PAGE cannot be used in block classes. Use $this->page.
(#129) global $PAGE cannot be used in block classes. Use $this->page.
(#134) global $PAGE cannot be used in block classes. Use $this->page.
(#135) global $PAGE cannot be used in block classes. Use $this->page.
(#135) global $PAGE cannot be used in block classes. Use $this->page.
(#138) Expected 1 space after "="; 2 found
(#138) global $PAGE cannot be used in block classes. Use $this->page.
(#143) Inline comments must start with a capital letter, digit or 3-dots sequence
(#143) This comment is 54% valid code; is this commented out code?
(#143) No space found before comment text; expected "// if (!empty($config['settings_showstudygroups'])) {" but found "//if (!empty($config['settings_showstudygroups'])) {"
(#145) Line exceeds 132 characters; contains 161 characters
(#145) No space found before comment text; expected "// $studygroups = \local_o365\feature\usergroups\utils::study_groups_list($USER->id, ['courseid' => $PAGE->context->instanceid], false, 0, 5);" but found "//$studygroups = \local_o365\feature\usergroups\utils::study_groups_list($USER->id, ['courseid' => $PAGE->context->instanceid], false, 0, 5);"
(#146) No space found before comment text; expected "// $items = array_merge($items, $studygroups);" but found "//$items = array_merge($items, $studygroups);"
(#147) Inline comments must end in full-stops, exclamation marks, or question marks
(#147) No space found before comment text; expected "// }" but found "//}"
(#159) global $PAGE cannot be used in block classes. Use $this->page.
(#168) global $PAGE cannot be used in block classes. Use $this->page.
(#169) global $PAGE cannot be used in block classes. Use $this->page.
(#170) global $PAGE cannot be used in block classes. Use $this->page.
(#211) global $PAGE cannot be used in block classes. Use $this->page.
(#211) global $PAGE cannot be used in block classes. Use $this->page.
(#215) global $PAGE cannot be used in block classes. Use $this->page.
(#228) Inline comments must end in full-stops, exclamation marks, or question marks
(#303) Line exceeds 132 characters; contains 144 characters
(#406) global $PAGE cannot be used in block classes. Use $this->page.
(#428) global $PAGE cannot be used in block classes. Use $this->page.
(#428) global $PAGE cannot be used in block classes. Use $this->page.
(#429) global $PAGE cannot be used in block classes. Use $this->page.
(#431) global $PAGE cannot be used in block classes. Use $this->page.
(#478) Line exceeds 132 characters; contains 137 characters
blocks/microsoft/db/access.php
(#24) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
blocks/microsoft/db/caches.php
(#24) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
blocks/microsoft/db/upgrade.php
(#33) Spaces must be used to indent lines; tabs are not allowed
(#33) Tab found within whitespace
(#33) Line indented incorrectly; expected 4 spaces, found 1
(#34) Spaces must be used to indent lines; tabs are not allowed
(#34) Tab found within whitespace
(#34) Line indented incorrectly; expected at least 8 spaces, found 2
(#35) Spaces must be used to indent lines; tabs are not allowed
(#35) Tab found within whitespace
(#35) Line indented incorrectly; expected at least 8 spaces, found 2
(#36) Spaces must be used to indent lines; tabs are not allowed
(#36) Tab found within whitespace
(#36) Line indented incorrectly; expected at least 8 spaces, found 2
(#37) Spaces must be used to indent lines; tabs are not allowed
(#37) Tab found within whitespace
(#37) Line indented incorrectly; expected 4 spaces, found 1
(#38) Spaces must be used to indent lines; tabs are not allowed
(#38) Tab found within whitespace
(#38) Line indented incorrectly; expected at least 4 spaces, found 1
blocks/microsoft/lib.php
(#1) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
blocks/microsoft/settings.php
(#109) This comment is 48% valid code; is this commented out code?
(#110) No space found before comment text; expected "// $label = new lang_string('settings_showstudygroups', 'block_microsoft');" but found "//$label = new lang_string('settings_showstudygroups', 'block_microsoft');"
(#111) No space found before comment text; expected "// $desc = new lang_string('settings_showstudygroups_desc', 'block_microsoft');" but found "//$desc = new lang_string('settings_showstudygroups_desc', 'block_microsoft');"
(#112) Inline comments must end in full-stops, exclamation marks, or question marks
(#112) No space found before comment text; expected "// $settings->add(new \admin_setting_configcheckbox('block_microsoft/settings_showstudygroups', $label, $desc, 1));" but found "//$settings->add(new \admin_setting_configcheckbox('block_microsoft/settings_showstudygroups', $label, $desc, 1));"

Javascript coding style problems

(2 errors, 4 warnings)

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

blocks/microsoft/js/microsoft.js
(#23) Missing JSDoc for parameter 'url'. (valid-jsdoc)
(#25) Missing JSDoc parameter type for 'string'. (valid-jsdoc)
(#25) Expected JSDoc for 'Y' but found 'string'. (valid-jsdoc)
(#27) Identifier 'microsoft_update_profile' is not in camel case. (camelcase)
(#27) 'microsoft_update_profile' is defined but never used. (no-unused-vars)
(#28) '$' is not defined. (no-undef)

CSS problems

(61 errors, 2 warnings)

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

blocks/microsoft/styles.css
(#3) Expected newline before "}" (block-closing-brace-newline-before)
(#7) Expected newline before "}" (block-closing-brace-newline-before)
(#15) Expected newline before "}" (block-closing-brace-newline-before)
(#17) Expected newline before "}" (block-closing-brace-newline-before)
(#19) Expected newline before "}" (block-closing-brace-newline-before)
(#21) Expected newline before "}" (block-closing-brace-newline-before)
(#23) Expected newline before "}" (block-closing-brace-newline-before)
(#25) Expected newline before "}" (block-closing-brace-newline-before)
(#27) Expected newline before "}" (block-closing-brace-newline-before)
(#29) Expected newline before "}" (block-closing-brace-newline-before)
(#31) Expected newline before "}" (block-closing-brace-newline-before)
(#33) Expected newline before "}" (block-closing-brace-newline-before)
(#35) Expected newline before "}" (block-closing-brace-newline-before)
(#37) Expected newline before "}" (block-closing-brace-newline-before)
(#39) Expected newline before "}" (block-closing-brace-newline-before)
(#41) Expected newline before "}" (block-closing-brace-newline-before)
(#43) Expected newline before "}" (block-closing-brace-newline-before)
(#45) Expected newline before "}" (block-closing-brace-newline-before)
(#47) Expected newline before "}" (block-closing-brace-newline-before)
(#51) Expected newline before "}" (block-closing-brace-newline-before)
(#53) Expected newline before "}" (block-closing-brace-newline-before)
(#59) Expected newline before "}" (block-closing-brace-newline-before)
(#17) Unexpected !important (declaration-no-important)
(#53) Unexpected !important (declaration-no-important)
(#9) Unexpected unit (length-zero-no-unit)
(#16) Expected newline after "," (selector-list-comma-newline-after)
(#16) Expected newline after "," (selector-list-comma-newline-after)
(#2) Expected indentation of 4 spaces (indentation)
(#3) Expected indentation of 4 spaces (indentation)
(#5) Expected indentation of 4 spaces (indentation)
(#6) Expected indentation of 4 spaces (indentation)
(#7) Expected indentation of 4 spaces (indentation)
(#8) Expected indentation of 0 spaces (indentation)
(#16) Expected indentation of 0 spaces (indentation)
(#17) Expected indentation of 4 spaces (indentation)
(#19) Expected indentation of 4 spaces (indentation)
(#21) Expected indentation of 4 spaces (indentation)
(#23) Expected indentation of 4 spaces (indentation)
(#25) Expected indentation of 4 spaces (indentation)
(#27) Expected indentation of 4 spaces (indentation)
(#29) Expected indentation of 4 spaces (indentation)
(#31) Expected indentation of 4 spaces (indentation)
(#33) Expected indentation of 4 spaces (indentation)
(#35) Expected indentation of 4 spaces (indentation)
(#37) Expected indentation of 4 spaces (indentation)
(#39) Expected indentation of 4 spaces (indentation)
(#41) Expected indentation of 4 spaces (indentation)
(#43) Expected indentation of 4 spaces (indentation)
(#45) Expected indentation of 4 spaces (indentation)
(#47) Expected indentation of 4 spaces (indentation)
(#49) Expected indentation of 4 spaces (indentation)
(#50) Expected indentation of 4 spaces (indentation)
(#51) Expected indentation of 4 spaces (indentation)
(#53) Expected indentation of 4 spaces (indentation)
(#56) Expected indentation of 4 spaces (indentation)
(#57) Expected indentation of 4 spaces (indentation)
(#58) Expected indentation of 4 spaces (indentation)
(#59) Expected indentation of 4 spaces (indentation)
blocks/microsoft/sass/styles.scss
(#19) Unexpected !important (declaration-no-important)
(#74) Unexpected !important (declaration-no-important)
(#11) Unexpected unit (length-zero-no-unit)
(#18) Expected newline after "," (selector-list-comma-newline-after)
(#18) Expected newline after "," (selector-list-comma-newline-after)

PHPDocs style problems

(12 errors, 0 warnings)

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

blocks/microsoft/block_microsoft.php
(#17) No one-line description found in phpdocs for file
(#469) Phpdocs for function block_microsoft::render_signin_widget has incomplete parameters list
blocks/microsoft/classes/privacy/provider.php
(#26) Class provider is not documented
(#17) No one-line description found in phpdocs for file
blocks/microsoft/db/access.php
(#17) No one-line description found in phpdocs for file
blocks/microsoft/db/caches.php
(#17) No one-line description found in phpdocs for file
blocks/microsoft/db/upgrade.php
(#17) No one-line description found in phpdocs for file
(#18) Package local_o365 is not valid
blocks/microsoft/lang/en/block_microsoft.php
(#17) No one-line description found in phpdocs for file
blocks/microsoft/lib.php
(#18) No one-line description found in phpdocs for file
blocks/microsoft/update.php
(#17) No one-line description found in phpdocs for file
blocks/microsoft/version.php
(#17) No one-line description found in phpdocs for file

Update savepoints problems

(0 errors, 1 warnings)

This section shows problems detected with the handling of upgrade savepoints [More info]

blocks/microsoft/db/upgrade.php
Detected fewer 'if' blocks (0) than 'savepoint' calls (1). Repeated savepoints?

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:scss" 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]