@@ -20,28 +20,28 @@ |
||
| 20 | 20 | use OCP\Federation\ICloudFederationProviderManager; |
| 21 | 21 | |
| 22 | 22 | class Application extends App implements IBootstrap { |
| 23 | - public function __construct() { |
|
| 24 | - parent::__construct('federatedfilesharing'); |
|
| 25 | - } |
|
| 23 | + public function __construct() { |
|
| 24 | + parent::__construct('federatedfilesharing'); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function register(IRegistrationContext $context): void { |
|
| 28 | - $context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScriptsListener::class); |
|
| 29 | - $context->registerNotifierService(Notifier::class); |
|
| 30 | - } |
|
| 27 | + public function register(IRegistrationContext $context): void { |
|
| 28 | + $context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScriptsListener::class); |
|
| 29 | + $context->registerNotifierService(Notifier::class); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - public function boot(IBootContext $context): void { |
|
| 33 | - $context->injectFn(Closure::fromCallable([$this, 'registerCloudFederationProvider'])); |
|
| 34 | - } |
|
| 32 | + public function boot(IBootContext $context): void { |
|
| 33 | + $context->injectFn(Closure::fromCallable([$this, 'registerCloudFederationProvider'])); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - private function registerCloudFederationProvider(ICloudFederationProviderManager $manager, |
|
| 37 | - IAppContainer $appContainer): void { |
|
| 38 | - $fileResourceTypes = ['file', 'folder']; |
|
| 39 | - foreach ($fileResourceTypes as $type) { |
|
| 40 | - $manager->addCloudFederationProvider($type, |
|
| 41 | - 'Federated Files Sharing', |
|
| 42 | - function () use ($appContainer): CloudFederationProviderFiles { |
|
| 43 | - return $appContainer->get(CloudFederationProviderFiles::class); |
|
| 44 | - }); |
|
| 45 | - } |
|
| 46 | - } |
|
| 36 | + private function registerCloudFederationProvider(ICloudFederationProviderManager $manager, |
|
| 37 | + IAppContainer $appContainer): void { |
|
| 38 | + $fileResourceTypes = ['file', 'folder']; |
|
| 39 | + foreach ($fileResourceTypes as $type) { |
|
| 40 | + $manager->addCloudFederationProvider($type, |
|
| 41 | + 'Federated Files Sharing', |
|
| 42 | + function () use ($appContainer): CloudFederationProviderFiles { |
|
| 43 | + return $appContainer->get(CloudFederationProviderFiles::class); |
|
| 44 | + }); |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | foreach ($fileResourceTypes as $type) { |
| 40 | 40 | $manager->addCloudFederationProvider($type, |
| 41 | 41 | 'Federated Files Sharing', |
| 42 | - function () use ($appContainer): CloudFederationProviderFiles { |
|
| 42 | + function() use ($appContainer): CloudFederationProviderFiles { |
|
| 43 | 43 | return $appContainer->get(CloudFederationProviderFiles::class); |
| 44 | 44 | }); |
| 45 | 45 | } |