Passed
Push — master ( e67af9...64baeb )
by Luiz Kim
09:26 queued 01:57
created

MenuRole   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
eloc 11
c 2
b 0
f 0
dl 0
loc 77
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRole() 0 3 1
A setMenu() 0 5 1
A getId() 0 3 1
A getMenu() 0 3 1
A setRole() 0 5 1
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use ControleOnline\Entity\Role;
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\Role was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use ControleOnline\Entity\Menu;
8
9
/**
10
 * MenuRole
11
 *
12
 * @ORM\Table(name="menu_role", uniqueConstraints={@ORM\UniqueConstraint(name="menu_id", columns={"menu_id", "role_id"})}, indexes={@ORM\Index(name="role_id", columns={"role_id"}), @ORM\Index(name="IDX_9F267A24CCD7E912", columns={"menu_id"})})
13
 * @ORM\Entity
14
 * @ORM\EntityListeners({App\Listener\LogListener::class}) 
15
 */
16
class MenuRole
17
{
18
    /**
19
     * @var int
20
     *
21
     * @ORM\Column(name="id", type="integer", nullable=false)
22
     * @ORM\Id
23
     * @ORM\GeneratedValue(strategy="IDENTITY")
24
     */
25
    private $id;
26
27
    /**
28
     * @var \Menu
0 ignored issues
show
Bug introduced by
The type Menu was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
     *
30
     * @ORM\ManyToOne(targetEntity="Menu")
31
     * @ORM\JoinColumns({
32
     *   @ORM\JoinColumn(name="menu_id", referencedColumnName="id")
33
     * })
34
     */
35
    private $menu;
36
37
    /**
38
     * @var \Role
0 ignored issues
show
Bug introduced by
The type Role was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
39
     *
40
     * @ORM\ManyToOne(targetEntity="Role")
41
     * @ORM\JoinColumns({
42
     *   @ORM\JoinColumn(name="role_id", referencedColumnName="id")
43
     * })
44
     */
45
    private $role;
46
47
48
49
    /**
50
     * Get the value of id
51
     */
52
    public function getId(): int
53
    {
54
        return $this->id;
55
    }
56
57
58
59
    /**
60
     * Get the value of menu
61
     */
62
    public function getMenu(): Menu
63
    {
64
        return $this->menu;
65
    }
66
67
    /**
68
     * Set the value of menu
69
     */
70
    public function setMenu(Menu $menu): self
71
    {
72
        $this->menu = $menu;
0 ignored issues
show
Documentation Bug introduced by
It seems like $menu of type ControleOnline\Entity\Menu is incompatible with the declared type Menu of property $menu.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
73
74
        return $this;
75
    }
76
77
    /**
78
     * Get the value of role
79
     */
80
    public function getRole(): Role
81
    {
82
        return $this->role;
83
    }
84
85
    /**
86
     * Set the value of role
87
     */
88
    public function setRole(Role $role): self
89
    {
90
        $this->role = $role;
91
92
        return $this;
93
    }
94
}
95