Test Failed
Pull Request — master (#20)
by Alexander
04:07 queued 01:32
created

InfoController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App;
6
7
use Psr\Http\Message\ResponseInterface;
8
use Yiisoft\DataResponse\DataResponseFactoryInterface;
9
10
/**
11
 * @OA\Info(title="Yii API application", version="1.0")
12
 */
13
class InfoController
14
{
15
    /**
16
     * @OA\Get(
17
     *     path="/",
18
     *     summary="Returns info about the API",
19
     *     description="",
20
     *     @OA\Response(response="200", description="Success")
21
     * )
22
     */
23
    public function index(DataResponseFactoryInterface $responseFactory): ResponseInterface
24
    {
25
        return $responseFactory->createResponse(['version' => '3.0', 'author' => 'yiisoft']);
26
    }
27
}
28