Passed
Pull Request — master (#54)
by Vincent
06:15
created

File   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 17
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Component Bundle Project
5
 *
6
 * (c) Daniel West <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Silverback\ApiComponentBundle\Annotation;
15
16
/**
17
 * @author Daniel West <[email protected]>
18
 *
19
 * @Annotation
20
 * @Target("CLASS")
21
 */
22
final class File
23
{
24
    public string $fileFieldName = 'file';
25
26
    public string $filePathFieldName = 'filePath';
27
28
    public string $mediaObjectsProperty = 'mediaObjects';
29
30
    public string $uploadsFieldName = 'uploadsResource';
31
32
    /** @required */
33
    public ?string $uploadsEntityClass;
34
35 9
    public function __construct(array $values)
36
    {
37 9
        if (isset($values['value'])) {
38 9
            $this->uploadsEntityClass = $values['value'];
39
        }
40 9
    }
41
}
42