diff options
Diffstat (limited to 'vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php')
-rw-r--r-- | vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php b/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php index ee5b88a90..4fae96e0c 100644 --- a/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php +++ b/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL; use Sabre\DAV\Exception\InvalidResourceType; @@ -7,7 +9,7 @@ use Sabre\DAV\IExtendedCollection; use Sabre\DAV\MkCol; /** - * Principals Collection + * Principals Collection. * * This collection represents a list of users. * The users are instances of Sabre\DAVACL\Principal @@ -16,8 +18,8 @@ use Sabre\DAV\MkCol; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class PrincipalCollection extends AbstractPrincipalCollection implements IExtendedCollection, IACL { - +class PrincipalCollection extends AbstractPrincipalCollection implements IExtendedCollection, IACL +{ use ACLTrait; /** @@ -28,12 +30,12 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * supplied by the authentication backend. * * @param array $principal + * * @return \Sabre\DAV\INode */ - function getChildForPrincipal(array $principal) { - + public function getChildForPrincipal(array $principal) + { return new Principal($this->principalBackend, $principal); - } /** @@ -56,21 +58,20 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * property for you. * * @param string $name - * @param MkCol $mkCol + * @param MkCol $mkCol + * * @throws InvalidResourceType - * @return void */ - function createExtendedCollection($name, MkCol $mkCol) { - + public function createExtendedCollection($name, MkCol $mkCol) + { if (!$mkCol->hasResourceType('{DAV:}principal')) { throw new InvalidResourceType('Only resources of type {DAV:}principal may be created here'); } $this->principalBackend->createPrincipal( - $this->principalPrefix . '/' . $name, + $this->principalPrefix.'/'.$name, $mkCol ); - } /** @@ -85,7 +86,8 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * * @return array */ - function getACL() { + public function getACL() + { return [ [ 'principal' => '{DAV:}authenticated', @@ -94,5 +96,4 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend ], ]; } - } |