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

InfoController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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