aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Server.php')
-rw-r--r--lib/public/Server.php30
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/public/Server.php b/lib/public/Server.php
index 92560e2b17e..e30d67701f6 100644
--- a/lib/public/Server.php
+++ b/lib/public/Server.php
@@ -1,26 +1,10 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Carl Schwan <carl@carlschwan.eu>
- *
- * @license AGPL-3.0-or-later
- *
- * 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/>
- *
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP;
use Psr\Container\ContainerExceptionInterface;
@@ -31,6 +15,7 @@ use Psr\Container\NotFoundExceptionInterface;
* use whenever possible dependency injections instead.
*
* ```php
+ * use OCP\ITagManager;
* use OCP\Server;
*
* $tagManager = Server::get(ITagManager::class);
@@ -40,12 +25,9 @@ use Psr\Container\NotFoundExceptionInterface;
*/
final class Server {
/**
- * @template T
- * @param class-string<T>|string $serviceName
- * @return T|mixed
- * @psalm-template S as class-string<T>|string
- * @psalm-param S $serviceName
- * @psalm-return (S is class-string<T> ? T : mixed)
+ * @psalm-template T
+ * @psalm-param class-string<T>|string $serviceName
+ * @psalm-return ($serviceName is class-string<T> ? T : mixed)
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @since 25.0.0