Skip to content

Commit

Permalink
Cleanup: Change @codingStandardsIgnore tags to phpcs:disable, resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
abias authored Jun 13, 2024
1 parent 6ce7bdd commit 62296f8
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 45 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-06-13 - Cleanup: Change @codingStandardsIgnore tags to phpcs:disable, resolves #676.
* 2024-06-12 - Cleanup: Fix CSS warnings in external SCSS tests, resolves #674.

### v4.3-r14
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

defined('MOODLE_INTERNAL') || die();

// @codingStandardsIgnoreFile
// Let codechecker ignore this file. We prefer being able to diff this file easily than to make codechecker happy.
// phpcs:disable NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine

// Require own locallib.php.
require_once($CFG->dirroot . '/theme/boost_union/locallib.php');
Expand Down
6 changes: 2 additions & 4 deletions flavours/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
define('NO_UPGRADE_CHECK', true);

// Require config.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.require('../config.php');
require(__DIR__.'/../../../config.php');
// @codingStandardsIgnoreEnd
// after requiring config.php which is really not needed.
require(__DIR__.'/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require css sending libraries.
require_once($CFG->dirroot.'/lib/csslib.php');
Expand Down
6 changes: 2 additions & 4 deletions h5p/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
define('NO_UPGRADE_CHECK', true);

// Require config.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.require('../config.php');
require(__DIR__.'/../../../config.php');
// @codingStandardsIgnoreEnd
// after requiring config.php which is really not needed.
require(__DIR__.'/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require css sending libraries.
require_once($CFG->dirroot.'/lib/csslib.php');
Expand Down
4 changes: 1 addition & 3 deletions locallogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__.'/../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__.'/../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/lib/authlib.php');
Expand Down
6 changes: 2 additions & 4 deletions mobile/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
define('NO_UPGRADE_CHECK', true);

// Require config.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.require('../config.php');
require(__DIR__.'/../../../config.php');
// @codingStandardsIgnoreEnd
// after requiring config.php which is really not needed.
require(__DIR__.'/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require css sending libraries.
require_once($CFG->dirroot.'/lib/csslib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/aboutus.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/imprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/offers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/page1.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/page2.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
4 changes: 1 addition & 3 deletions pages/page3.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

// Include config.php.
// @codingStandardsIgnoreStart
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
// after requiring config.php which is really not needed.
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing

// Require the necessary libraries.
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
Expand Down
3 changes: 1 addition & 2 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@
}

// Create full settings page structure.
// @codingStandardsIgnoreLine
else if ($ADMIN->fulltree) {
else if ($ADMIN->fulltree) { // phpcs:disable moodle.ControlStructures.ControlSignature.Found

// Require the necessary libraries.
require_once($CFG->dirroot . '/theme/boost_union/lib.php');
Expand Down

0 comments on commit 62296f8

Please sign in to comment.