diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-09-07 23:52:10 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-09-26 23:10:23 +0200 |
commit | 2eff174deb6b8a06988742b21396cdd5b7504e6c (patch) | |
tree | 5565660d1c45362f3f466091ad901beeaba934ec /lib/public/Collaboration | |
parent | 7122739dd676629ab9d59d1c66d2553e1cb0aac3 (diff) | |
download | nextcloud-server-2eff174deb6b8a06988742b21396cdd5b7504e6c.tar.gz nextcloud-server-2eff174deb6b8a06988742b21396cdd5b7504e6c.zip |
add missing PHP doc
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/public/Collaboration')
-rw-r--r-- | lib/public/Collaboration/Collaborators/SearchResultType.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/public/Collaboration/Collaborators/SearchResultType.php b/lib/public/Collaboration/Collaborators/SearchResultType.php index 569adb864e9..65d20cd67f4 100644 --- a/lib/public/Collaboration/Collaborators/SearchResultType.php +++ b/lib/public/Collaboration/Collaborators/SearchResultType.php @@ -33,14 +33,29 @@ class SearchResultType { /** @var string */ protected $label; + /** + * SearchResultType constructor. + * + * @param string $label + * @since 13.0.0 + */ public function __construct($label) { $this->label = $this->getValidatedType($label); } + /** + * @return string + * @since 13.0.0 + */ public function getLabel() { return $this->label; } + /** + * @param $type + * @return string + * @throws \InvalidArgumentException + */ protected function getValidatedType($type) { $type = trim(strval($type)); @@ -48,7 +63,7 @@ class SearchResultType { throw new \InvalidArgumentException('Type must not be empty'); } - if(trim($type) === 'exact') { + if($type === 'exact') { throw new \InvalidArgumentException('Provided type is a reserved word'); } |