From d900c91050829e7b1e906d439735eabb533984c2 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 28 Aug 2023 22:06:36 +0000 Subject: [PATCH] update --- Admin/Installer.php | 3 +++ Controller/BackendController.php | 2 +- tests/Autoloader.php | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 77beada..3f29662 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -59,6 +59,9 @@ final class Installer extends InstallerAbstract * * @return array * + * @throws PathException + * @throws \Exception + * * @since 1.0.0 */ public static function installExternal(ApplicationAbstract $app, array $data) : array diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 4018f27..6dd4f63 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -52,7 +52,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-template-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response); - $path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/')); + $path = \strtr($request->getDataString('path') ?? '/', '+', ' '); $templates = WorkflowTemplateMapper::getAll() ->with('createdBy') ->with('tags') diff --git a/tests/Autoloader.php b/tests/Autoloader.php index 80a0a1e..d2d0080 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -71,14 +71,12 @@ final class Autoloader * * @return void * - * @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation. - * * @since 1.0.0 */ public static function defaultAutoloader(string $class) : void { $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = \strtr($class, '_\\', '//'); foreach (self::$paths as $path) { $file = $path . $class . '.php';