Completed
Pull Request — master (#15)
by Dawid
05:58
created

Application::onRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php declare(strict_types=1);
2
3
use FatCode\OpenApi\Annotation as Api;
4
use Psr\Http\Message\ServerRequestInterface;
5
use Psr\Http\Message\ResponseInterface;
6
use FatCode\OpenApi\Application\OnRequestListener;
7
use Zend\Diactoros\Response;
0 ignored issues
show
Bug introduced by
The type Zend\Diactoros\Response was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
/**
10
 * Your entry point/front controller.
11
 *
12
 * @Api\Application(
13
 *     title = "Your application title",
14
 *     version = "1.0.0",
15
 *     servers = [
16
 *         @Api\Server(
17
 *             id = "development",
18
 *             port = 80,
19
 *             host = "localhost"
20
 *         )
21
 *     ]
22
 * )
23
 */
24
class Application implements OnRequestListener
25
{
26
    public function onRequest(ServerRequestInterface $request) : ResponseInterface
27
    {
28
        return new Response('Hello world');
29
    }
30
}
31