Passed
Pull Request — master (#58)
by Daniel
05:24
created

FileInfo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 20
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
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 $fileSize;
30
    public ?int $width;
31
    public ?int $height;
32
    public ?string $filter;
33
34 2
    public function __construct(string $path, string $mimeType, int $fileSize, ?int $width, ?int $height, ?string $filter = null)
35
    {
36 2
        $this->setId();
37 2
        $this->path = $path;
38 2
        $this->mimeType = $mimeType;
39 2
        $this->width = $width;
40 2
        $this->height = $height;
41 2
        $this->fileSize = $fileSize;
42 2
        $this->filter = $filter;
43 2
    }
44
}
45