use imports instead of namespaces

This commit is contained in:
Sasha Anastasi
2025-02-27 09:09:06 +13:00
parent cff0f3fbe3
commit eac1575f51
16 changed files with 23 additions and 31 deletions

View File

@@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace auth_outage;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;

View File

@@ -23,9 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\calendar;
use auth_outage\local\outage;
use auth_outage\calendar\calendar;
/**
* calendar_test test class.

View File

@@ -23,9 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\dml;
use auth_outage\local\outage;
use auth_outage\dml\outagedb;
/**
* events_test tests class.

View File

@@ -25,9 +25,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\dml;
use auth_outage\local\outage;
use auth_outage\dml\outagedb;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/../base_testcase.php');

View File

@@ -23,9 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\dml;
use auth_outage\local\outage;
use auth_outage\dml\outagedb;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/../base_testcase.php');

View File

@@ -23,9 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\form\outage;
use auth_outage\local\outage;
use auth_outage\form\outage\delete;
use auth_outage\form\outage\finish;
use auth_outage\form\outage\edit;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/../../base_testcase.php');

View File

@@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace auth_outage;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/base_testcase.php');
require_once(__DIR__.'/../lib.php');

View File

@@ -23,7 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\cli;
use auth_outage\local\cli\cli_exception;
use auth_outage\local\cli\create;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/cli_testcase.php');

View File

@@ -23,8 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\cli;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/../../base_testcase.php');
@@ -78,7 +76,7 @@ abstract class cli_testcase extends \auth_outage\base_testcase {
*
* @return string The output text.
*/
protected function execute(clibase $cli) {
protected function execute(mixed $cli) {
ob_start();
try {
$cli->execute();

View File

@@ -23,10 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\cli;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
use auth_outage\local\cli\create;
use auth_outage\local\cli\cli_exception;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/cli_testcase.php');

View File

@@ -23,10 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\cli;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
use auth_outage\local\cli\finish;
use auth_outage\local\cli\cli_exception;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/cli_testcase.php');

View File

@@ -23,10 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\cli;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
use auth_outage\local\cli\waitforit;
use auth_outage\local\cli\cli_exception;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/cli_testcase.php');

View File

@@ -23,9 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\controllers;
use auth_outage\local\outage;
use auth_outage\local\controllers\infopage;
use context_system;
defined('MOODLE_INTERNAL') || die();

View File

@@ -23,9 +23,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace auth_outage\local\controllers;
use auth_outage\task\update_static_page;
use auth_outage\local\controllers\maintenance_static_page;
use auth_outage\local\controllers\maintenance_static_page_io;
use auth_outage\local\controllers\maintenance_static_page_generator;
use DOMDocument;
defined('MOODLE_INTERNAL') || die();

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace auth_outage\local;
use auth_outage\local\outage;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/../base_testcase.php');

View File

@@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace auth_outage\local;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
use auth_outage\local\outagelib;
defined('MOODLE_INTERNAL') || die();
global $CFG;