Completed
Push — master ( fc1f93...3f8ded )
by Valery
07:43
created

Photo::setSortOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * @ORM\Entity(repositoryClass="App\Repository\PhotoRepository")
12
 */
13
class Photo
14
{
15
    /**
16
     * @ORM\Id()
17
     * @ORM\GeneratedValue()
18
     * @ORM\Column(type="integer")
19
     */
20
    private $id;
21
22
    /**
23
     * @ORM\ManyToOne(targetEntity="App\Entity\Property", inversedBy="photos")
24
     * @ORM\JoinColumn(nullable=true)
25
     */
26
    private $property;
27
28
    /**
29
     * @ORM\Column(type="string", length=255)
30
     *
31
     * @Assert\File(mimeTypes={ "image/*" })
32
     */
33
    private $photo;
34
35
    /**
36
     * @ORM\Column(type="integer", nullable=true)
37
     */
38
    private $sort_order;
39
40
    public function getId(): ?int
41
    {
42
        return $this->id;
43
    }
44
45
    public function getProperty(): ?Property
46
    {
47
        return $this->property;
48
    }
49
50
    public function setProperty(?Property $property): self
51
    {
52
        $this->property = $property;
53
54
        return $this;
55
    }
56
57
    public function getPhoto()
58
    {
59
        return $this->photo;
60
    }
61
62
    public function setPhoto($photo)
63
    {
64
        $this->photo = $photo;
65
66
        return $this;
67
    }
68
69
    public function getSortOrder(): ?int
70
    {
71
        return $this->sort_order;
72
    }
73
74
    public function setSortOrder(?int $sort_order): self
75
    {
76
        $this->sort_order = $sort_order;
77
78
        return $this;
79
    }
80
}
81