1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 02:06:08 +02:00

Cleanup code, typehints and class references

This commit is contained in:
Franz Liedke
2017-07-02 13:29:30 +02:00
parent e46b3d54d1
commit 4aad7c1040
23 changed files with 87 additions and 69 deletions

View File

@@ -84,15 +84,6 @@ abstract class AbstractConfigureRoutes
*/
protected function route($method, $url, $name, $controller)
{
$this->routes->$method($url, $name, $this->toController($controller));
}
/**
* @param string $controller
* @return callable
*/
protected function toController($controller)
{
return $this->route->toController($controller);
$this->routes->$method($url, $name, $this->route->toController($controller));
}
}

View File

@@ -11,6 +11,8 @@
namespace Flarum\Event;
use Flarum\Forum\Controller\FrontendController;
/**
* Configure forum routes.
*
@@ -21,7 +23,7 @@ class ConfigureForumRoutes extends AbstractConfigureRoutes
/**
* {@inheritdoc}
*/
public function get($url, $name, $handler = 'Flarum\Forum\Controller\WebAppController')
public function get($url, $name, $handler = FrontendController::class)
{
parent::get($url, $name, $handler);
}