Document   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A changeTitle() 0 4 1
A changeDescription() 0 4 1
A getId() 0 4 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