Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null |
||
27 | { |
||
28 | if ('true' !== $this->settingsManager->getSetting('social.allow_social_tool')) { |
||
29 | throw new AccessDeniedHttpException(); |
||
30 | } |
||
31 | |||
32 | if ($operation instanceof CollectionOperationInterface) { |
||
33 | return $this->collectionProvider->provide($operation, $uriVariables, $context); |
||
34 | } |
||
35 | |||
36 | return $this->itemProvider->provide($operation, $uriVariables, $context); |
||
37 | } |
||
39 |