Skip to content

Commit

Permalink
Added support for require_admin since MDL-58439
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Nov 12, 2019
1 parent 111fe2f commit fbaf6a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion moodle/Sniffs/Files/RequireLoginSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

class moodle_Sniffs_Files_RequireLoginSniff implements PHP_CodeSniffer_Sniff {
public $loginfunctions = ['require_login', 'require_course_login', 'admin_externalpage_setup'];
public $loginfunctions = ['require_login', 'require_course_login', 'require_admin', 'admin_externalpage_setup'];
public $ignorewhendefined = ['NO_MOODLE_COOKIES', 'CLI_SCRIPT', 'ABORT_AFTER_CONFIG'];
/**
* Register for open tag (only process once per file).
Expand Down
2 changes: 1 addition & 1 deletion moodle/tests/moodlestandard_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public function test_moodle_files_requirelogin_problem() {

$this->set_errors(array());
$this->set_warnings(array(
25 => 'check (require_login, require_course_login, admin_externalpage_setup) following config inclusion. None found'
25 => 'check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found'
));

$this->verify_cs_results();
Expand Down

0 comments on commit fbaf6a2

Please sign in to comment.