Passed
Pull Request — master (#50)
by Daniel
10:36 queued 02:25
created

File::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 2
nc 2
nop 1
crap 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 $temporaryFieldName = 'temporary';
29
30
    public string $mediaObjectsProperty = 'mediaObjects';
31
32
    public string $uploadsFieldName = 'uploads';
33
34
    public bool $disableGetCollection = false;
35
36
    /** @required */
37
    public ?string $uploadsEntityClass;
38
39 1
    public function __construct(array $values)
40
    {
41 1
        if (isset($values['value'])) {
42 1
            $this->uploadsEntityClass = $values['value'];
43
        }
44 1
    }
45
}
46