for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Routers;
use Nette,
Nette\Application\Routers\RouteList,
Nette\Application\Routers\Route,
Nette\Application\Routers\SimpleRouter;
/**
* Router factory.
*/
class RouterFactory
{
* @return \Nette\Application\IRouter
public function createRouter()
$router = new RouteList();
$router[] = new Route('', 'Dashboard:default', Route::ONE_WAY);
'Dashboard:default'
string
array
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$router[] = new Route('index.php', 'Dashboard:default', Route::ONE_WAY);
$router[] = new Route('dashboard/', 'Dashboard:default');
$router[] = new Route('registrace/[<action>/[<guid>/]]', 'Registration:default', Route::ONE_WAY);
'Registration:default'
$router[] = new Route('registration/[<action>/[<guid>/]]', 'Registration:default');
$router[] = new Route('export/[<action>/[<type>/[<id>/]]]', 'Export:default');
'Export:default'
$router[] = new Route('block/annotation/<guid>', [
'presenter' => 'Annotation',
'action' => 'edit',
'type' => 'block',
], Route::ONE_WAY);
$router[] = new Route('program/annotation/<guid>', [
'type' => 'program',
$router[] = new Route('annotation/<action>/<type>/<guid>/', 'Annotation:default');
'Annotation:default'
$router[] = new Route('<presenter>/[<action>/[<id>/]]', 'Dashboard:listing');
'Dashboard:listing'
return $router;
}
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: