Completed
Push — master ( 346372...987832 )
by Matt
04:57
created

Problem::setCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace App\Entity;
4
5
use App\Repository\ProblemRepository;
6
use DateTime;
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * @ORM\Entity(repositoryClass=ProblemRepository::class)
11
 */
12
class Problem
13
{
14
    function __construct()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
15
    {
16
        $this->createdAt = new DateTime();
17
    }
18
19
    /**
20
     * @ORM\Id
21
     * @ORM\GeneratedValue
22
     * @ORM\Column(type="integer")
23
     */
24
    private $id;
25
26
    /**
27
     * @ORM\Column(type="datetime")
28
     */
29
    private $createdAt;
30
31
    /**
32
     * @ORM\Column(type="text")
33
     */
34
    private $description;
35
36
    /**
37
     * @ORM\Column(type="string", length=255, nullable=true)
38
     */
39
    private $uri;
40
41
    public function getId(): ?int
42
    {
43
        return $this->id;
44
    }
45
46
    public function getCreatedAt(): ?\DateTimeInterface
47
    {
48
        return $this->createdAt;
49
    }
50
51
    public function setCreatedAt(\DateTimeInterface $createdAt): self
52
    {
53
        $this->createdAt = $createdAt;
54
55
        return $this;
56
    }
57
58
    public function getDescription(): ?string
59
    {
60
        return $this->description;
61
    }
62
63
    public function setDescription(string $description): self
64
    {
65
        $this->description = $description;
66
67
        return $this;
68
    }
69
70
    public function getUri(): ?string
71
    {
72
        return $this->uri;
73
    }
74
75
    public function setUri(?string $uri): self
76
    {
77
        $this->uri = $uri;
78
79
        return $this;
80
    }
81
}
82