Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 18:11:51 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 21:25:08 +0300
commit50acde36b77f58f44f48725809143eaa27997988 (patch)
tree9b6c01b16d146b407e75a2d81cf33797ef966956 /lib/public/Federation
parenta159d7c28c483a2b77e2f533795f6d6d1ec720fd (diff)
Make OCP\Federation strict
* Also internal classes * Added scalar typehints * Added return type * Made strict Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Federation')
-rw-r--r--lib/public/Federation/ICloudId.php9
-rw-r--r--lib/public/Federation/ICloudIdManager.php7
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/public/Federation/ICloudId.php b/lib/public/Federation/ICloudId.php
index b03acb4f5f2..6cc17984f96 100644
--- a/lib/public/Federation/ICloudId.php
+++ b/lib/public/Federation/ICloudId.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017, Robin Appelman <robin@icewind.nl>
*
@@ -35,7 +36,7 @@ interface ICloudId {
* @return string
* @since 12.0.0
*/
- public function getId();
+ public function getId(): string;
/**
* Get a clean representation of the cloud id for display
@@ -43,7 +44,7 @@ interface ICloudId {
* @return string
* @since 12.0.0
*/
- public function getDisplayId();
+ public function getDisplayId(): string;
/**
* The username on the remote server
@@ -51,7 +52,7 @@ interface ICloudId {
* @return string
* @since 12.0.0
*/
- public function getUser();
+ public function getUser(): string;
/**
* The base address of the remote server
@@ -59,5 +60,5 @@ interface ICloudId {
* @return string
* @since 12.0.0
*/
- public function getRemote();
+ public function getRemote(): string;
}
diff --git a/lib/public/Federation/ICloudIdManager.php b/lib/public/Federation/ICloudIdManager.php
index b5b3436e6fc..c139cfda6cd 100644
--- a/lib/public/Federation/ICloudIdManager.php
+++ b/lib/public/Federation/ICloudIdManager.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017, Robin Appelman <robin@icewind.nl>
*
@@ -37,7 +38,7 @@ interface ICloudIdManager {
*
* @since 12.0.0
*/
- public function resolveCloudId($cloudId);
+ public function resolveCloudId(string $cloudId): ICloudId;
/**
* Get the cloud id for a remote user
@@ -48,7 +49,7 @@ interface ICloudIdManager {
*
* @since 12.0.0
*/
- public function getCloudId($user, $remote);
+ public function getCloudId(string $user, string $remote): ICloudId;
/**
* Check if the input is a correctly formatted cloud id
@@ -58,5 +59,5 @@ interface ICloudIdManager {
*
* @since 12.0.0
*/
- public function isValidCloudId($cloudId);
+ public function isValidCloudId(string $cloudId): bool;
}