1 | <?php |
||
12 | class RuleResult |
||
13 | { |
||
14 | /** |
||
15 | * @var Rule |
||
16 | */ |
||
17 | protected $rule; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $needRoleName; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $needResourceName; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $priority; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $id; |
||
38 | |||
39 | /** |
||
40 | * @var |
||
41 | */ |
||
42 | protected $action; |
||
43 | |||
44 | /** |
||
45 | * @var bool |
||
46 | */ |
||
47 | protected $isInit = false; |
||
48 | |||
49 | /** |
||
50 | * @param Rule $rule |
||
51 | * @param int $priority |
||
52 | * @param $needRoleName |
||
53 | * @param $needResourceName |
||
54 | */ |
||
55 | 31 | public function __construct(Rule $rule, $priority, $needRoleName, $needResourceName) |
|
65 | |||
66 | /** |
||
67 | * @param int $priority |
||
68 | */ |
||
69 | 1 | public function setPriority($priority) |
|
73 | |||
74 | /** |
||
75 | * @return string |
||
76 | */ |
||
77 | 2 | public function getNeedResourceName() |
|
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | 2 | public function getNeedRoleName() |
|
89 | |||
90 | /** |
||
91 | * @return Rule |
||
92 | */ |
||
93 | 27 | public function getRule() |
|
97 | |||
98 | /** |
||
99 | * @return bool |
||
100 | */ |
||
101 | 27 | public function getAction() |
|
110 | |||
111 | /** |
||
112 | * @return int |
||
113 | */ |
||
114 | 2 | public function getPriority() |
|
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | 1 | public function getId() |
|
126 | |||
127 | /** |
||
128 | * @return ResourceAggregateInterface |
||
129 | */ |
||
130 | 2 | public function getResourceAggregate() |
|
134 | |||
135 | /** |
||
136 | * @return RoleAggregateInterface |
||
137 | */ |
||
138 | 2 | public function getRoleAggregate() |
|
142 | } |
||
143 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.