Passed
Pull Request — develop (#44)
by Mario
01:44
created

Role   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRole() 0 3 1
A setRole() 0 5 1
1
<?php
2
3
namespace App\Entity\Attribute\Accessor;
4
5
use App\Entity\Role as RoleEntity;
6
7
/**
8
 * Trait Role
9
 */
10
trait Role
11
{
12
    /**
13
     * Set role
14
     *
15
     * @param \App\Entity\Role $role
16
     * @return object
17
     */
18
    public function setRole(RoleEntity $role = null)
19
    {
20
        $this->role = $role;
0 ignored issues
show
Bug Best Practice introduced by
The property role does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
21
22
        return $this;
23
    }
24
25
    /**
26
     * Get role
27
     *
28
     * @return \App\Entity\Role
29
     */
30
    public function getRole()
31
    {
32
        return $this->role;
33
    }
34
}
35