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 string |
||
31 | */ |
||
32 | protected $id; |
||
33 | |||
34 | /** |
||
35 | * @var |
||
36 | */ |
||
37 | protected $action; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | protected $isInit = false; |
||
43 | |||
44 | /** |
||
45 | * @param Rule $rule |
||
46 | * @param $needRoleName |
||
47 | * @param $needResourceName |
||
48 | */ |
||
49 | 31 | public function __construct(Rule $rule, $needRoleName, $needResourceName) |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 2 | public function getNeedResourceName() |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | 2 | public function getNeedRoleName() |
|
74 | |||
75 | /** |
||
76 | * @return Rule |
||
77 | */ |
||
78 | 27 | public function getRule() |
|
82 | |||
83 | /** |
||
84 | * @return bool |
||
85 | */ |
||
86 | 27 | public function getAction() |
|
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | 1 | public function getId() |
|
103 | |||
104 | /** |
||
105 | * @return ResourceAggregateInterface |
||
106 | */ |
||
107 | 2 | public function getResourceAggregate() |
|
111 | |||
112 | /** |
||
113 | * @return RoleAggregateInterface |
||
114 | */ |
||
115 | 2 | public function getRoleAggregate() |
|
119 | } |
||
120 |
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.