Test Failed
Pull Request — master (#58)
by Daniel
20:36
created

FileInfo::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 6
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Components 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\ApiComponentsBundle\Entity\Core;
15
16
use Silverback\ApiComponentsBundle\Entity\Utility\IdTrait;
17
18
/**
19
 * Optional entity only mapped if imagine installed.
20
 *
21
 * @author Daniel West <[email protected]>
22
 */
23
class FileInfo
24
{
25
    use IdTrait;
26
27
    public string $path;
28
    public string $mimeType;
29
    public int $width;
30
    public int $height;
31
    public int $fileSize;
32
    public ?string $filter;
33
34
    public function __construct(string $path, string $mimeType, int $width, int $height, int $fileSize, ?string $filter = null)
35
    {
36
        $this->setId();
37
        $this->path = $path;
38
        $this->mimeType = $mimeType;
39
        $this->width = $width;
40
        $this->height = $height;
41
        $this->fileSize = $fileSize;
42
        $this->filter = $filter;
43
    }
44
}
45