@@ 200-216 (lines=17) @@ | ||
197 | * @param string[] $statuses |
|
198 | * @return bool |
|
199 | */ |
|
200 | private function canUseStoredResults( |
|
201 | array $entityIds, |
|
202 | array $claimIds, |
|
203 | array $constraintIds = null, |
|
204 | array $statuses |
|
205 | ) { |
|
206 | if ( $claimIds !== [] ) { |
|
207 | return false; |
|
208 | } |
|
209 | if ( $constraintIds !== null ) { |
|
210 | return false; |
|
211 | } |
|
212 | if ( $statuses != $this->cachedStatuses ) { |
|
213 | return false; |
|
214 | } |
|
215 | return true; |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * @param EntityId[] $entityIds |
|
@@ 279-292 (lines=14) @@ | ||
276 | * @param string[] $statuses |
|
277 | * @return bool |
|
278 | */ |
|
279 | private function canStoreResults( |
|
280 | array $entityIds, |
|
281 | array $claimIds, |
|
282 | array $constraintIds = null, |
|
283 | array $statuses |
|
284 | ) { |
|
285 | if ( $constraintIds !== null ) { |
|
286 | return false; |
|
287 | } |
|
288 | if ( $statuses != $this->cachedStatuses ) { |
|
289 | return false; |
|
290 | } |
|
291 | return true; |
|
292 | } |
|
293 | ||
294 | /** |
|
295 | * @param EntityId $entityId |
@@ 197-213 (lines=17) @@ | ||
194 | * @param string[] $statuses |
|
195 | * @return bool |
|
196 | */ |
|
197 | private function canUseStoredResults( |
|
198 | array $entityIds, |
|
199 | array $claimIds, |
|
200 | array $constraintIds = null, |
|
201 | array $statuses |
|
202 | ) { |
|
203 | if ( $claimIds !== [] ) { |
|
204 | return false; |
|
205 | } |
|
206 | if ( $constraintIds !== null ) { |
|
207 | return false; |
|
208 | } |
|
209 | if ( array_diff( $statuses, $this->cachedStatuses ) !== [] ) { |
|
210 | return false; |
|
211 | } |
|
212 | return true; |
|
213 | } |
|
214 | ||
215 | /** |
|
216 | * @param EntityId[] $entityIds |
|
@@ 257-270 (lines=14) @@ | ||
254 | * @param string[] $statuses |
|
255 | * @return bool |
|
256 | */ |
|
257 | private function canStoreResults( |
|
258 | array $entityIds, |
|
259 | array $claimIds, |
|
260 | array $constraintIds = null, |
|
261 | array $statuses |
|
262 | ) { |
|
263 | if ( $constraintIds !== null ) { |
|
264 | return false; |
|
265 | } |
|
266 | if ( array_diff( $this->cachedStatuses, $statuses ) !== [] ) { |
|
267 | return false; |
|
268 | } |
|
269 | return true; |
|
270 | } |
|
271 | ||
272 | /** |
|
273 | * Store check results for the given entity ID in the cache, if possible. |