From dcc23114e9328d822539782644bedcf5cba7e72d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 23 Sep 2016 18:20:04 +0200 Subject: [PATCH] fix annotations & copyright headers --- apps/dav/lib/AppInfo/Application.php | 86 +------------------ .../lib/CalDAV/Publishing/PublishPlugin.php | 22 ++++- .../lib/CalDAV/Publishing/Xml/Publisher.php | 20 ++++- apps/dav/lib/DAV/PublicAuth.php | 3 - 4 files changed, 41 insertions(+), 90 deletions(-) diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 69a5e336bbf..dc3ce7e8bb2 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -37,90 +37,8 @@ class Application extends App { /** * Application constructor. */ - public function __construct (array $urlParams=array()) { - parent::__construct('dav', $urlParams); - - $container = $this->getContainer(); - $container->registerService('ContactsManager', function($c) { - /** @var IAppContainer $c */ - return new ContactsManager( - $c->query('CardDavBackend') - ); - }); - - $container->registerService('HookManager', function($c) { - /** @var IAppContainer $c */ - return new HookManager( - $c->getServer()->getUserManager(), - $c->query('SyncService'), - $c->query('CalDavBackend'), - $c->query('CardDavBackend') - ); - }); - - $container->registerService('SyncService', function($c) { - /** @var IAppContainer $c */ - return new SyncService( - $c->query('CardDavBackend'), - $c->getServer()->getUserManager(), - $c->getServer()->getLogger() - ); - }); - - $container->registerService('CardDavBackend', function($c) { - /** @var IAppContainer $c */ - $db = $c->getServer()->getDatabaseConnection(); - $dispatcher = $c->getServer()->getEventDispatcher(); - $principal = new Principal( - $c->getServer()->getUserManager(), - $c->getServer()->getGroupManager() - ); - return new CardDavBackend($db, $principal, $c->getServer()->getUserManager(), $dispatcher); - }); - - $container->registerService('CalDavBackend', function($c) { - /** @var IAppContainer $c */ - $db = $c->getServer()->getDatabaseConnection(); - $userManager = $c->getServer()->getUserManager(); - $config = $c->getServer()->getConfig(); - $random = $c->getServer()->getSecureRandom(); - - $principal = new Principal( - $c->getServer()->getUserManager(), - $c->getServer()->getGroupManager() - ); - return new CalDavBackend($db, $principal, $userManager, $config, $random); - }); - - $container->registerService('BirthdayService', function($c) { - /** @var IAppContainer $c */ - $g = new GroupPrincipalBackend( - $c->getServer()->getGroupManager() - ); - return new BirthdayService( - $c->query('CalDavBackend'), - $c->query('CardDavBackend'), - $g - ); - }); - - $container->registerService('OCA\DAV\Migration\Classification', function ($c) { - /** @var IAppContainer $c */ - return new Classification( - $c->query('CalDavBackend'), - $c->getServer()->getUserManager() - ); - }); - - $container->registerService('OCA\DAV\Migration\GenerateBirthdays', function ($c) { - /** @var IAppContainer $c */ - /** @var BirthdayService $b */ - $b = $c->query('BirthdayService'); - return new GenerateBirthdays( - $b, - $c->getServer()->getUserManager() - ); - }); + public function __construct() { + parent::__construct('dav'); } /** diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 241e5260c70..199bc67e615 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -1,5 +1,23 @@ + * + * @copyright Copyright (c) 2016 Thomas Citharel + * @license GNU AGPL version 3 or any later version + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ namespace OCA\DAV\CalDAV\Publishing; use Sabre\DAV\PropFind; @@ -116,7 +134,7 @@ class PublishPlugin extends ServerPlugin { * @param RequestInterface $request * @param ResponseInterface $response * - * @return null|bool + * @return void|bool */ public function httpPost(RequestInterface $request, ResponseInterface $response) { $path = $request->getPath(); diff --git a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php index 375954ffaf3..1fdba22e9e0 100644 --- a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php +++ b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php @@ -1,5 +1,23 @@ + * + * @copyright Copyright (c) 2016 Thomas Citharel + * @license GNU AGPL version 3 or any later version + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ namespace OCA\DAV\CalDAV\Publishing\Xml; use OCA\DAV\CalDAV\Publishing\PublishPlugin as Plugin; diff --git a/apps/dav/lib/DAV/PublicAuth.php b/apps/dav/lib/DAV/PublicAuth.php index 33588fc0add..ffc588c4a56 100644 --- a/apps/dav/lib/DAV/PublicAuth.php +++ b/apps/dav/lib/DAV/PublicAuth.php @@ -29,9 +29,6 @@ class PublicAuth implements BackendInterface { /** @var string[] */ private $publicURLs; - /** - * @param string[] $publicURLs - */ public function __construct() { $this->publicURLs = [ 'public-calendars', -- 2.39.5