diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-19 16:50:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-05 09:54:14 +0100 |
commit | 0ed00bca439b73c53f145e2e1bf83d6b32d98623 (patch) | |
tree | 6a5e2f7dbee4886acbec22c86abca901585bb704 | |
parent | 556c9b6f460d462ff22f886ff678d4d4299b871c (diff) | |
download | nextcloud-server-0ed00bca439b73c53f145e2e1bf83d6b32d98623.tar.gz nextcloud-server-0ed00bca439b73c53f145e2e1bf83d6b32d98623.zip |
Use namespace
-rw-r--r-- | lib/private/connector/sabre/principal.php | 20 | ||||
-rw-r--r-- | tests/lib/connector/sabre/principal.php | 8 |
2 files changed, 23 insertions, 5 deletions
diff --git a/lib/private/connector/sabre/principal.php b/lib/private/connector/sabre/principal.php index 5ddde98c358..4bb28c65ddd 100644 --- a/lib/private/connector/sabre/principal.php +++ b/lib/private/connector/sabre/principal.php @@ -9,15 +9,21 @@ * See the COPYING-README file. */ +namespace OC\Connector\Sabre; + use OCP\IUserManager; use OCP\IConfig; -class OC_Connector_Sabre_Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { +class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { /** @var IConfig */ private $config; /** @var IUserManager */ private $userManager; + /** + * @param IConfig $config + * @param IUserManager $userManager + */ public function __construct(IConfig $config, IUserManager $userManager) { $this->config = $config; @@ -45,7 +51,7 @@ class OC_Connector_Sabre_Principal implements \Sabre\DAVACL\PrincipalBackend\Bac $principal = [ 'uri' => 'principals/' . $user->getUID(), - '{DAV:}displayname' => $user->getUID() + '{DAV:}displayname' => $user->getUID(), ]; $email = $this->config->getUserValue($user->getUID(), 'settings', 'email'); @@ -149,10 +155,20 @@ class OC_Connector_Sabre_Principal implements \Sabre\DAVACL\PrincipalBackend\Bac throw new \Sabre\DAV\Exception('Setting members of the group is not supported yet'); } + /** + * @param string $path + * @param array $mutations + * @return int + */ function updatePrincipal($path, $mutations) { return 0; } + /** + * @param string $prefixPath + * @param array $searchProperties + * @return array + */ function searchPrincipals($prefixPath, array $searchProperties) { return []; } diff --git a/tests/lib/connector/sabre/principal.php b/tests/lib/connector/sabre/principal.php index 77edf0113ba..91e74dae047 100644 --- a/tests/lib/connector/sabre/principal.php +++ b/tests/lib/connector/sabre/principal.php @@ -8,15 +8,17 @@ * See the COPYING-README file. */ +namespace OC\Connector\Sabre; + use OCP\IUserManager; use OCP\IConfig; -class Test_OC_Connector_Sabre_Principal extends \Test\TestCase { +class Test_Principal extends \Test\TestCase { /** @var IUserManager */ private $userManager; /** @var IConfig */ private $config; - /** @var OC_Connector_Sabre_Principal */ + /** @var Principal */ private $connector; public function setUp() { @@ -25,7 +27,7 @@ class Test_OC_Connector_Sabre_Principal extends \Test\TestCase { $this->config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor()->getMock(); - $this->connector = new OC_Connector_Sabre_Principal($this->config, $this->userManager); + $this->connector = new Principal($this->config, $this->userManager); parent::setUp(); } |