Completed
Pull Request — development (#546)
by Nick
06:21
created

CountryEntity::isNew()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Country;
4
5
use Oc\Repository\AbstractEntity;
6
7
/**
8
 * Class CountryEntity
9
 *
10
 * @package Oc\Country
11
 */
12
class CountryEntity extends AbstractEntity
13
{
14
    /**
15
     * @var string
16
     */
17
    public $short;
18
19
    /**
20
     * @var string
21
     */
22
    public $name;
23
24
    /**
25
     * @var string
26
     */
27
    public $de;
28
29
    /**
30
     * @var string
31
     */
32
    public $en;
33
34
    /**
35
     * @var int
36
     */
37
    public $translationId;
38
39
    /**
40
     * @var bool
41
     */
42
    public $listDefaultDe;
43
44
    /**
45
     * @var bool
46
     */
47
    public $listDefaultEn;
48
49
    /**
50
     * @var string
51
     */
52
    public $sortDe;
53
54
    /**
55
     * @var string
56
     */
57
    public $sortEn;
58
59
    /**
60
     * Checks if the entity is new.
61
     *
62
     * @return bool
63
     */
64
    public function isNew()
65
    {
66
        return $this->short === null;
67
    }
68
}
69