diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-09-23 18:20:04 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 11:55:43 +0200 |
commit | dcc23114e9328d822539782644bedcf5cba7e72d (patch) | |
tree | ce2a4923c5e58675c1ac9e8452e5750ac5439e89 /apps | |
parent | 9c75b00850f940993fc5f6e5bb52bccf58b43023 (diff) | |
download | nextcloud-server-dcc23114e9328d822539782644bedcf5cba7e72d.tar.gz nextcloud-server-dcc23114e9328d822539782644bedcf5cba7e72d.zip |
fix annotations & copyright headers
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 86 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/PublishPlugin.php | 22 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php | 20 | ||||
-rw-r--r-- | 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 @@ <?php - +/** + * @author Thomas Citharel <tcit@tcit.fr> + * + * @copyright Copyright (c) 2016 Thomas Citharel <tcit@tcit.fr> + * @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 <http://www.gnu.org/licenses/> + * + */ 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 @@ <?php - +/** + * @author Thomas Citharel <tcit@tcit.fr> + * + * @copyright Copyright (c) 2016 Thomas Citharel <tcit@tcit.fr> + * @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 <http://www.gnu.org/licenses/> + * + */ 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', |