Skip to content

Commit 67c14b0

Browse files
refactor(App): \OC\AppFramework\App clean-up
Signed-off-by: Josh <[email protected]>
1 parent 3ba7888 commit 67c14b0

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

lib/private/AppFramework/App.php

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public static function getAppIdForClass(string $className, string $topNamespace
7171
return null;
7272
}
7373

74-
7574
/**
7675
* Shortcut for calling a controller method and printing the result
7776
*
@@ -82,7 +81,12 @@ public static function getAppIdForClass(string $className, string $topNamespace
8281
* @param array $urlParams list of URL parameters (optional)
8382
* @throws HintException
8483
*/
85-
public static function main(string $controllerName, string $methodName, DIContainer $container, ?array $urlParams = null) {
84+
public static function main(
85+
string $controllerName,
86+
string $methodName,
87+
DIContainer $container,
88+
?array $urlParams = null,
89+
): void {
8690
/** @var IProfiler $profiler */
8791
$profiler = $container->get(IProfiler::class);
8892
$eventLogger = $container->get(IEventLogger::class);
@@ -211,25 +215,4 @@ public static function main(string $controllerName, string $methodName, DIContai
211215
}
212216
}
213217
}
214-
215-
/**
216-
* Shortcut for calling a controller method and printing the result.
217-
* Similar to App:main except that no headers will be sent.
218-
*
219-
* @param string $controllerName the name of the controller under which it is
220-
* stored in the DI container
221-
* @param string $methodName the method that you want to call
222-
* @param array $urlParams an array with variables extracted from the routes
223-
* @param DIContainer $container an instance of a pimple container.
224-
*/
225-
public static function part(string $controllerName, string $methodName, array $urlParams,
226-
DIContainer $container) {
227-
$container['urlParams'] = $urlParams;
228-
$controller = $container[$controllerName];
229-
230-
$dispatcher = $container['Dispatcher'];
231-
232-
[, , $output] = $dispatcher->dispatch($controller, $methodName);
233-
return $output;
234-
}
235218
}

0 commit comments

Comments
 (0)