Skip to content

Commit e8c2320

Browse files
committed
refactor(federatedfilesharing): remove use of IAppContainer in favor of ContainerInterface
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
1 parent cddd666 commit e8c2320

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

apps/federatedfilesharing/lib/AppInfo/Application.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
namespace OCA\FederatedFileSharing\AppInfo;
99

10-
use Closure;
1110
use OCA\FederatedFileSharing\Listeners\LoadAdditionalScriptsListener;
1211
use OCA\FederatedFileSharing\Notifier;
1312
use OCA\FederatedFileSharing\OCM\CloudFederationProviderFiles;
@@ -16,8 +15,8 @@
1615
use OCP\AppFramework\Bootstrap\IBootContext;
1716
use OCP\AppFramework\Bootstrap\IBootstrap;
1817
use OCP\AppFramework\Bootstrap\IRegistrationContext;
19-
use OCP\AppFramework\IAppContainer;
2018
use OCP\Federation\ICloudFederationProviderManager;
19+
use Psr\Container\ContainerInterface;
2120

2221
class Application extends App implements IBootstrap {
2322
public function __construct() {
@@ -30,11 +29,11 @@ public function register(IRegistrationContext $context): void {
3029
}
3130

3231
public function boot(IBootContext $context): void {
33-
$context->injectFn(Closure::fromCallable([$this, 'registerCloudFederationProvider']));
32+
$context->injectFn($this->registerCloudFederationProvider(...));
3433
}
3534

3635
private function registerCloudFederationProvider(ICloudFederationProviderManager $manager,
37-
IAppContainer $appContainer): void {
36+
ContainerInterface $appContainer): void {
3837
$fileResourceTypes = ['file', 'folder'];
3938
foreach ($fileResourceTypes as $type) {
4039
$manager->addCloudFederationProvider($type,

0 commit comments

Comments
 (0)