Completed
Push — master ( 5f6140...e3e09e )
by Dmitrij
03:29
created

routes.php (1 issue)

1
<?php
2
3
use Psr\Http\Message\ServerRequestInterface;
4
use Psr\Http\Message\ResponseInterface;
5
use \HotRodCli\Api\Processor;
6
use \HotRodCli\Api\GetCommands;
7
8
/** @var \Slim\App $api */
9
$api->post('/create/{command}', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($app) {
10
    return $response->getBody()->write($app->resolve(Processor::class)($request, $args));
11
});
12
13
$api->get('/commands', function(ServerRequestInterface $request, ResponseInterface $response, $arg) use ($app) {
0 ignored issues
show
The parameter $arg is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

13
$api->get('/commands', function(ServerRequestInterface $request, ResponseInterface $response, /** @scrutinizer ignore-unused */ $arg) use ($app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
14
    return $response->getBody()->write($app->resolve(GetCommands::class)());
15
});