Completed
Pull Request — master (#2609)
by
unknown
15:25
created

EditableMediaWrapper   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMedia() 0 4 1
A setMedia() 0 6 1
A getRunTimeConfig() 0 4 1
A setRunTimeConfig() 0 6 1
1
<?php
2
3
namespace Kunstmaan\MediaBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Kunstmaan\AdminBundle\Entity\AbstractEntity;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * @ORM\Entity()
11
 * @ORM\Table(name="kuma_editable_media_wrapper")
12
 */
13
class EditableMediaWrapper extends AbstractEntity
14
{
15
    /**
16
     * @ORM\ManyToOne(targetEntity="Kunstmaan\MediaBundle\Entity\Media", cascade={"persist"})
17
     * @ORM\JoinColumn(name="media_id", referencedColumnName="id")
18
     * @Assert\NotNull()
19
     */
20
    private $media;
21
22
    /**
23
     * @ORM\Column(name="runtime_config", type="text", nullable=true)
24
     */
25
    private $runTimeConfig;
26
27
    public function getMedia(): ?Media
28
    {
29
        return $this->media;
30
    }
31
32
    public function setMedia(Media $media): EditableMediaWrapper
33
    {
34
        $this->media = $media;
35
36
        return $this;
37
    }
38
39
    public function getRunTimeConfig()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
40
    {
41
        return $this->runTimeConfig;
42
    }
43
44
    public function setRunTimeConfig($runTimeConfig): EditableMediaWrapper
45
    {
46
        $this->runTimeConfig = $runTimeConfig;
47
48
        return $this;
49
    }
50
}
51