From aedbdc536a62d8076f567c853f4cd73f644bf0af Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Mon, 16 Dec 2019 00:31:29 +0100 Subject: [PATCH] Refactor deprecated App::getArgumentValue() to DI::args()->get() --- src/App.php | 10 ---------- src/Module/Help.php | 2 +- src/Module/Install.php | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/App.php b/src/App.php index 05d592367d..7b0fa07abc 100644 --- a/src/App.php +++ b/src/App.php @@ -543,16 +543,6 @@ class App return Core\Theme::getStylesheetPath($this->getCurrentTheme()); } - /** - * @deprecated use Arguments->get() instead - * - * @see App\Arguments - */ - public function getArgumentValue($position, $default = '') - { - return $this->args->get($position, $default); - } - /** * Sets the base url for use in cmdline programs which don't have * $_SERVER variables diff --git a/src/Module/Help.php b/src/Module/Help.php index 7c1ecd7465..70c99a0a6f 100644 --- a/src/Module/Help.php +++ b/src/Module/Help.php @@ -36,7 +36,7 @@ class Help extends BaseModule $path .= '/'; } - $path .= $a->getArgumentValue($x); + $path .= DI::args()->get($x); } $title = basename($path); $filename = $path; diff --git a/src/Module/Install.php b/src/Module/Install.php index 228f4be44a..10a6176e40 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -57,8 +57,7 @@ class Install extends BaseModule // route: install/testrwrite // $baseurl/install/testrwrite to test if rewrite in .htaccess is working - // @TODO: Replace with parameter from router - if ($a->getArgumentValue(1, '') == 'testrewrite') { + if (DI::args()->get(1, '') == 'testrewrite') { // Status Code 204 means that it worked without content throw new HTTPException\NoContentException(); } -- 2.39.5