Permissions::setPermissions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace App\Entity\Attribute\Accessor;
4
5
/**
6
 * Trait Permissions
7
 */
8
trait Permissions
9
{
10
    /**
11
     * Set permissions
12
     *
13
     * @param array $permissions
14
     * @return object
15
     */
16
    public function setPermissions(?array $permissions)
17
    {
18
        $this->permissions = $permissions;
0 ignored issues
show
Bug Best Practice introduced by
The property permissions does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19
20
        return $this;
21
    }
22
23
    /**
24
     * Get permissions
25
     *
26
     * @return array
27
     * @throws \OutOfRangeException
28
     */
29
    public function getPermissions(): ?array
30
    {
31
        return $this->permissions;
32
    }
33
}
34