|
4 | 4 | * |
5 | 5 | * @author Bjoern Schiessle <bjoern@schiessle.org> |
6 | 6 | * @author Christoph Wurst <christoph@winzerhof-wurst.at> |
| 7 | + * @author Maxence Lange <maxence@artificial-owl.com> |
7 | 8 | * @author Roeland Jago Douma <roeland@famdouma.nl> |
8 | 9 | * @author Kate Döen <kate.doeen@nextcloud.com> |
9 | 10 | * |
|
55 | 56 | * @psalm-import-type CloudFederationApiError from ResponseDefinitions |
56 | 57 | */ |
57 | 58 | class RequestHandlerController extends Controller { |
58 | | - |
59 | | - /** @var LoggerInterface */ |
60 | | - private $logger; |
61 | | - |
62 | | - /** @var IUserManager */ |
63 | | - private $userManager; |
64 | | - |
65 | | - /** @var IGroupManager */ |
66 | | - private $groupManager; |
67 | | - |
68 | | - /** @var IURLGenerator */ |
69 | | - private $urlGenerator; |
70 | | - |
71 | | - /** @var ICloudFederationProviderManager */ |
72 | | - private $cloudFederationProviderManager; |
73 | | - |
74 | | - /** @var Config */ |
75 | | - private $config; |
76 | | - |
77 | | - /** @var ICloudFederationFactory */ |
78 | | - private $factory; |
79 | | - |
80 | | - /** @var ICloudIdManager */ |
81 | | - private $cloudIdManager; |
82 | | - |
83 | | - public function __construct($appName, |
84 | | - IRequest $request, |
85 | | - LoggerInterface $logger, |
86 | | - IUserManager $userManager, |
87 | | - IGroupManager $groupManager, |
88 | | - IURLGenerator $urlGenerator, |
89 | | - ICloudFederationProviderManager $cloudFederationProviderManager, |
90 | | - Config $config, |
91 | | - ICloudFederationFactory $factory, |
92 | | - ICloudIdManager $cloudIdManager |
| 59 | + public function __construct( |
| 60 | + string $appName, |
| 61 | + IRequest $request, |
| 62 | + private LoggerInterface $logger, |
| 63 | + private IUserManager $userManager, |
| 64 | + private IGroupManager $groupManager, |
| 65 | + private IURLGenerator $urlGenerator, |
| 66 | + private ICloudFederationProviderManager $cloudFederationProviderManager, |
| 67 | + private Config $config, |
| 68 | + private ICloudFederationFactory $factory, |
| 69 | + private ICloudIdManager $cloudIdManager |
93 | 70 | ) { |
94 | 71 | parent::__construct($appName, $request); |
95 | | - |
96 | | - $this->logger = $logger; |
97 | | - $this->userManager = $userManager; |
98 | | - $this->groupManager = $groupManager; |
99 | | - $this->urlGenerator = $urlGenerator; |
100 | | - $this->cloudFederationProviderManager = $cloudFederationProviderManager; |
101 | | - $this->config = $config; |
102 | | - $this->factory = $factory; |
103 | | - $this->cloudIdManager = $cloudIdManager; |
104 | 72 | } |
105 | 73 |
|
106 | 74 | /** |
@@ -128,7 +96,6 @@ public function __construct($appName, |
128 | 96 | * 501: Share type or the resource type is not supported |
129 | 97 | */ |
130 | 98 | public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) { |
131 | | - |
132 | 99 | // check if all required parameters are set |
133 | 100 | if ($shareWith === null || |
134 | 101 | $name === null || |
@@ -253,7 +220,6 @@ public function addShare($shareWith, $name, $description, $providerId, $owner, $ |
253 | 220 | * 501: The resource type is not supported |
254 | 221 | */ |
255 | 222 | public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) { |
256 | | - |
257 | 223 | // check if all required parameters are set |
258 | 224 | if ($notificationType === null || |
259 | 225 | $resourceType === null || |
@@ -311,7 +277,7 @@ public function receiveNotification($notificationType, $resourceType, $providerI |
311 | 277 | ); |
312 | 278 | } |
313 | 279 |
|
314 | | - return new JSONResponse($result,Http::STATUS_CREATED); |
| 280 | + return new JSONResponse($result, Http::STATUS_CREATED); |
315 | 281 | } |
316 | 282 |
|
317 | 283 | /** |
|
0 commit comments