Completed
Push — master ( 3bb683...8cf661 )
by Korotkov
01:35
created

app/route.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace App;
4
5
use Rudra\Router;
6
use Rudra\RouterException;
7
8
class Route
9
{
10
11
    /**
12
     * Устанавливаем приоритет маршрутов
13
     *
14
     * @param \Rudra\Router $router
15
     *
16
     * @throws \Rudra\RouterException
17
     */
18
    public function run(Router $router)
19
    {
20
        $route = new Http\Route($router, $this->container()->config('namespaces', 'web'));
0 ignored issues
show
The method container() does not seem to exist on object<App\Route>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
21
        $router->setToken($route->getToken());
22
23
        if (!$router->isToken()) {
24
            throw new RouterException('404');
25
        }
26
    }
27
}
28