Completed
Pull Request — development (#829)
by
unknown
04:35
created

GeoCacheLogsArchivedEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 82
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isNew() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Oc\Entity;
4
5
use DateTime;
6
use Oc\Repository\AbstractEntity;
7
8 View Code Duplication
class GeoCacheLogsArchivedEntity extends AbstractEntity
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /** @var int */
11
    public $id;
12
13
    /** @var string */
14
    public $uuid;
15
16
    /** @var int */
17
    public $node;
18
19
    /** @var DateTime */
20
    public $dateCreated;
21
22
    /** @var DateTime */
23
    public $entryLastModified;
24
25
    /** @var DateTime */
26
    public $lastModified;
27
28
    /** @var string */
29
    public $okapiSyncbase;
30
31
    /** @var DateTime */
32
    public $logLastModified;
33
34
    /** @var int */
35
    public $cacheId;
36
37
    /** @var int */
38
    public $userId;
39
40
    /** @var int */
41
    public $type;
42
43
    /** @var int */
44
    public $ocTeamComment;
45
46
    /** @var DateTime */
47
    public $date;
48
49
    /** @var DateTime */
50
    public $orderDate;
51
52
    /** @var int */
53
    public $needsMaintenance;
54
55
    /** @var int */
56
    public $listingOutdated;
57
58
    /** @var string */
59
    public $text;
60
61
    /** @var int */
62
    public $textHtml;
63
64
    /** @var int */
65
    public $textHtmledit;
66
67
    /** @var int */
68
    public $ownerNotified;
69
70
    /** @var int */
71
    public $picture;
72
73
    /** @var DateTime */
74
    public $deletionDate;
75
76
    /** @var int */
77
    public $deletedBy;
78
79
    /** @var int */
80
    public $restoredBy;
81
82
    /**
83
     * @return bool
84
     */
85
    public function isNew() : bool
86
    {
87
        return $this->id === null;
88
    }
89
}
90