MDL-71807 cleanup: Replace deprecated codingStandardsIgnore annotations

The PHP_CodeSniffer @codingStandardsIgnore annotations are deprecated
and, since version 3.x, the new // phpcs:ignore comments should be used
instead.

This commits just reviews all the uses in core, replacing them for
the better new candidate, or removing when no longer needed.
This commit is contained in:
Eloy Lafuente (stronk7) 2022-01-29 23:52:19 +01:00
parent 01eb6d2e9b
commit a5c91474ee
21 changed files with 30 additions and 57 deletions

View file

@ -1,5 +1,5 @@
<?php
// @codingStandardsIgnoreFile
// phpcs:ignoreFile
// @codeCoverageIgnoreStart
// This file is part of Moodle - http://moodle.org/

View file

@ -33,8 +33,8 @@ use tool_policy\output\page_agreedocs;
// Do not check for the site policies in require_login() to avoid the redirect loop.
define('NO_SITEPOLICY_CHECK', true);
// @codingStandardsIgnoreLine See the {@link page_agreedocs} for the access control checks.
require(__DIR__.'/../../../config.php');
// See the {@see page_agreedocs} for the access control checks.
require(__DIR__.'/../../../config.php'); // phpcs:ignore
$submit = optional_param('submit', null, PARAM_NOTAGS);
$cancel = optional_param('cancel', null, PARAM_NOTAGS);

View file

@ -35,8 +35,8 @@ use tool_policy\output\page_viewdoc;
// Do not check for the site policies in require_login() to avoid the redirect loop.
define('NO_SITEPOLICY_CHECK', true);
// @codingStandardsIgnoreLine See the {@link page_viewdoc} for the access control checks.
require(__DIR__.'/../../../config.php');
// See the {@see page_viewdoc} for the access control checks.
require(__DIR__.'/../../../config.php'); // phpcs:ignore
$versionid = optional_param('versionid', null, PARAM_INT);
$policyid = $versionid ? optional_param('policyid', null, PARAM_INT) : required_param('policyid', PARAM_INT);

View file

@ -31,8 +31,8 @@ use tool_policy\output\page_viewalldoc;
// Do not check for the site policies in require_login() to avoid the redirect loop.
define('NO_SITEPOLICY_CHECK', true);
// @codingStandardsIgnoreLine See the {@link page_viewalldoc} for the access control checks.
require(__DIR__.'/../../../config.php');
// See the {@see page_viewalldoc} for the access control checks.
require(__DIR__.'/../../../config.php'); // phpcs:ignore
$returnurl = optional_param('returnurl', '', PARAM_LOCALURL); // A return URL.