Application   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
dl 0
loc 5
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A onRequest() 0 3 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;
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 = 8080,
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
32
# Run with `open-api run development`
33