for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Nip\Request;
use Nip\Router\Route\Route;
use Nip\Router\RouteFactory;
use Nip\Router\Router;
use Nip\Router\Tests\Fixtures\Application\Library\Router\Route\StandardRoute;
/**
* Class MatchingBench
* @Iterations(5)
* @Revs(100)
* @BeforeMethods({"init"})
*/
class MatchingBench
{
* @var Router
protected $router;
public function benchStaticRoutesNip()
$request = Request::create('/index999');
$this->router->route($request);
Nip\Router\Router::route()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
/** @scrutinizer ignore-deprecated */ $this->router->route($request);
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
}
public function benchDynamicRoutesNip()
$request = Request::create('/999/posts/create');
public function benchStaticRoutesSymfony()
$this->router->matchRequest($request);
public function benchDynamicRoutesSymfony()
public function init()
$this->router = new Router();
$collection = $this->router->getRoutes();
for ($i = 0; $i < 1000; ++$i) {
RouteFactory::generateLiteralRoute(
$collection,
"index." . $i,
Route::class,
"",
"/index" . $i);
RouteFactory::generateStandardRoute(
"index.standard" . $i,
StandardRoute::class,
"/".$i);
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.