Completed
Pull Request — development (#798)
by Nick
04:43
created

SecurityRoleHierarchyEntity::isNew()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Entity;
4
5
use Oc\Repository\AbstractEntity;
6
7
class SecurityRoleHierarchyEntity extends AbstractEntity
8
{
9
    /** @var int */
10
    public $roleId;
11
12
    /** @var int */
13
    public $subRoleId;
14
15
    /**
16
     * @return bool
17
     */
18
    public function isNew(): bool
19
    {
20
        return $this->roleId === null;
21
    }
22
}
23