Document::changeTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Madkom\RegistryApplication\Domain\CarManagement;
4
5
abstract class Document
6
{
7
    private $id;
8
9
    private $source;
10
11
    private $createDate;
12
13
    private $title;
14
15
    private $description;
16
17
    public function __construct($id, $source)
18
    {
19
        $this->id = $id;
20
        $this->source = $source;
21
        $this->createDate = new \DateTime('now');
22
    }
23
24
    public function changeTitle($newTitle)
25
    {
26
        $this->title = $newTitle;
27
    }
28
29
    public function changeDescription($newDescription)
30
    {
31
        $this->description = $newDescription;
32
    }
33
34
    public function getId()
35
    {
36
        return $this->id;
37
    }
38
}
39