Update MDTlLoader and MDAllowedValueSets

phpcs-errors:226 phpunit-status:successful phpstan-errors:209
This commit is contained in:
2020-10-29 20:45:59 +01:00
committed by Stefan Rohde-Enslin
parent 36b8fec24b
commit a8f73a4b86
8 changed files with 97 additions and 71 deletions

View File

@ -9,12 +9,13 @@
declare(strict_types = 1);
// Set autoloader
error_reporting(E_ALL);
ini_set('display_errors', "1");
spl_autoload_register("mdCsvxmlAutoloader");
set_exception_handler("mdExceptionHandler");
set_error_handler("mdErrorHandler", E_ALL);
\error_reporting(E_ALL);
\ini_set('display_errors', "1");
\spl_autoload_register("mdCsvxmlAutoloader");
\set_exception_handler("mdExceptionHandler");
\set_error_handler("mdErrorHandler", E_ALL);
require_once __DIR__ . '/../inc/constants.php';
require_once __DIR__ . '/../vendor/autoload.php';
/**
@ -26,22 +27,11 @@ require_once __DIR__ . '/../vendor/autoload.php';
*/
function mdCsvxmlAutoloader(string $className):void {
$classDirs = [
__DIR__ . "/../classes/MDTlLoader",
__DIR__ . "/../classes/MD_STD",
__DIR__ . "/../classes/MDAllowedValueSets/src",
__DIR__ . "/../classes/MDExportFormats/src",
__DIR__ . "/../classes/MDErrorReporter",
__DIR__ . "/../classes/MDMailer/src",
__DIR__ . "/../conf",
__DIR__ . "/../classes/MDErrorReporter/exceptions/generic",
__DIR__ . "/../classes/MDErrorReporter/exceptions/page",
__DIR__ . "/../classes/MDErrorReporter/exceptions/updates",
];
$classDirs = AUTOLOAD_DIRS;
foreach ($classDirs as $classDir) {
if (file_exists("$classDir/$className.php")) {
if (\file_exists("$classDir/$className.php")) {
include "$classDir/$className.php";
return;
}