1 | <?php declare(strict_types=1); |
||
32 | class PolicySet implements PolicySetInterface |
||
33 | { |
||
34 | /** |
||
35 | * @var string|null |
||
36 | */ |
||
37 | private $name; |
||
38 | |||
39 | /** |
||
40 | * @var TargetInterface |
||
41 | */ |
||
42 | private $target; |
||
43 | |||
44 | /** |
||
45 | * @var PolicyInterface[]|PolicySetInterface[] |
||
46 | */ |
||
47 | private $policiesAndSets; |
||
48 | |||
49 | /** |
||
50 | * @var PolicyCombiningAlgorithmInterface |
||
51 | */ |
||
52 | private $combiningAlgorithm; |
||
53 | |||
54 | /** |
||
55 | * @var MethodInterface[] |
||
56 | */ |
||
57 | private $obligations; |
||
58 | |||
59 | /** |
||
60 | * @var MethodInterface[] |
||
61 | */ |
||
62 | private $advice; |
||
63 | |||
64 | /** |
||
65 | * @param PolicyInterface[]|PolicySetInterface[] $policiesAndSets |
||
66 | * @param PolicyCombiningAlgorithmInterface $combiningAlgorithm |
||
67 | * @param null|string $name |
||
68 | * @param TargetInterface $target |
||
|
|||
69 | * @param MethodInterface[] $obligations |
||
70 | 13 | * @param MethodInterface[] $advice |
|
71 | */ |
||
72 | public function __construct( |
||
84 | |||
85 | /** |
||
86 | 13 | * @inheritdoc |
|
87 | */ |
||
88 | 13 | public function getName(): ?string |
|
92 | |||
93 | /** |
||
94 | * @param null|string $name |
||
95 | * |
||
96 | 13 | * @return self |
|
97 | */ |
||
98 | 13 | public function setName(?string $name): self |
|
104 | |||
105 | /** |
||
106 | 13 | * @inheritdoc |
|
107 | */ |
||
108 | 13 | public function getTarget(): ?TargetInterface |
|
112 | |||
113 | /** |
||
114 | * @param TargetInterface|null $target |
||
115 | * |
||
116 | 13 | * @return self |
|
117 | */ |
||
118 | 13 | public function setTarget(?TargetInterface $target): self |
|
124 | |||
125 | /** |
||
126 | 13 | * @inheritdoc |
|
127 | */ |
||
128 | 13 | public function getPoliciesAndSets(): array |
|
132 | |||
133 | /** |
||
134 | * @param PolicyInterface[]|PolicySetInterface[] $policiesAndSets |
||
135 | * |
||
136 | 13 | * @return self |
|
137 | */ |
||
138 | 13 | public function setPoliciesAndSets(array $policiesAndSets): self |
|
144 | |||
145 | /** |
||
146 | 13 | * @inheritdoc |
|
147 | */ |
||
148 | 13 | public function getCombiningAlgorithm(): PolicyCombiningAlgorithmInterface |
|
152 | |||
153 | /** |
||
154 | * @param PolicyCombiningAlgorithmInterface $combiningAlgorithm |
||
155 | * |
||
156 | 13 | * @return self |
|
157 | */ |
||
158 | 13 | public function setCombiningAlgorithm(PolicyCombiningAlgorithmInterface $combiningAlgorithm): self |
|
164 | |||
165 | /** |
||
166 | 13 | * @inheritdoc |
|
167 | */ |
||
168 | 13 | public function getObligations(): array |
|
172 | |||
173 | /** |
||
174 | * @param ObligationInterface[] $obligations |
||
175 | * |
||
176 | 13 | * @return self |
|
177 | */ |
||
178 | 13 | public function setObligations(array $obligations): self |
|
184 | |||
185 | /** |
||
186 | 13 | * @inheritdoc |
|
187 | */ |
||
188 | 13 | public function getAdvice(): array |
|
192 | |||
193 | /** |
||
194 | * @param AdviceInterface[] $advice |
||
195 | * |
||
196 | 13 | * @return self |
|
197 | */ |
||
198 | 13 | public function setAdvice(array $advice): self |
|
204 | } |
||
205 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.