Passed
Pull Request — master (#631)
by ANTHONIUS
08:16
created

File::setMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Core\Entity;
6
7
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
8
9
/**
10
 * Class File
11
 *
12
 * @author Anthonius Munthi <[email protected]>
13
 * @since 0.36
14
 * @package Core\Entity
15
 */
16
abstract class File implements FileInterface
17
{
18
    use FileTrait;
19
20
    /**
21
     * @ODM\File\Metadata(targetDocument="Core\Entity\FileMetadata")
22
     */
23
    protected FileMetadataInterface $metadata;
24
25
    public function setMetadata(FileMetadataInterface $metadata)
26
    {
27
        $this->metadata = $metadata;
28
        return $this;
29
    }
30
31
    public function getMetadata()
32
    {
33
        return $this->metadata;
34
    }
35
}