Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(router): readability and type hints #48329

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshtrichards
Copy link
Member

  • Resolves: #

Summary

TODO

  • ...

Checklist

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added 2. developing Work in progress ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Sep 24, 2024
Signed-off-by: Josh <josh.t.richards@gmail.com>
@@ -102,7 +102,7 @@
*
* @param null|string $app
*/
public function loadRoutes($app = null) {
public function loadRoutes(?string $app = null): ?string {

Check failure

Code scanning / Psalm

InvalidReturnType Error

Not all code paths of OC\Route\Router::loadRoutes end in a return statement, return type null|string expected
$pattern,
array $defaults = [],
array $requirements = []) {
public function create(string $name, string $pattern, array $defaults = [], array $requirements = []): \OC\Route\Route {

Check failure

Code scanning / Psalm

MethodSignatureMismatch Error

Argument 1 of OC\Route\Router::create has wrong type 'string', expecting '' as defined by OCP\Route\IRouter::create
$pattern,
array $defaults = [],
array $requirements = []) {
public function create(string $name, string $pattern, array $defaults = [], array $requirements = []): \OC\Route\Route {

Check failure

Code scanning / Psalm

MethodSignatureMismatch Error

Argument 2 of OC\Route\Router::create has wrong type 'string', expecting '' as defined by OCP\Route\IRouter::create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant