OAReader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 5 1
1
<?php
2
/**
3
 * Copyright (c) 2020.
4
 * @author Paweł Antosiak <[email protected]>
5
 */
6
7
declare(strict_types=1);
8
9
namespace Gorynych\Util;
10
11
use OpenApi\Annotations\OpenApi;
12
13
/**
14
 * Wrapper for Swagger OpenAPI scan function
15
 * @see \OpenApi\scan()
16
 */
17
final class OAReader
18
{
19
    public function read(): OpenApi
20
    {
21
        return \OpenApi\scan([
22
            EnvAccess::get('PROJECT_DIR') . '/src',
23
            EnvAccess::get('PROJECT_DIR') . '/config',
24
        ]);
25
    }
26
}
27