diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-05-26 11:30:43 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-05-26 11:30:43 +0200 |
commit | f11d998371453c27b989ce3e16b742dcc841e4d2 (patch) | |
tree | d15c8cfeaa2995d226e0f0c70ae04dad8c01e853 | |
parent | 10ef98a3b16004a97b673ad5c740eb50bdfe6f26 (diff) | |
download | nextcloud-server-f11d998371453c27b989ce3e16b742dcc841e4d2.tar.gz nextcloud-server-f11d998371453c27b989ce3e16b742dcc841e4d2.zip |
Make IDE happy
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
10 files changed, 81 insertions, 18 deletions
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php index 2411a46d8ee..87c2e408424 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php @@ -117,6 +117,11 @@ class IntegrationTestAccessGroupsMatchFilter extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestAccessGroupsMatchFilter($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php index f433930bd26..0eef5507538 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php @@ -23,6 +23,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OC\ServerNotAvailableException; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; @@ -64,7 +65,7 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { protected function case1() { try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -85,7 +86,7 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { 'ldap_backup_port' => '32123', ]); $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; @@ -106,13 +107,18 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest { 'ldap_backup_port' => '', ]); $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestBackupServer($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php index 89ce764e51a..24476c9a868 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php @@ -29,6 +29,9 @@ use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; require_once __DIR__ . '/../Bootstrap.php'; class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest { + /** @var UserMapping */ + protected $mapping; + /** * prepares the LDAP environment and sets up a test configuration for * the LDAP backend. @@ -68,6 +71,11 @@ class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest { } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestBatchApplyUserAttributes($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php index 44b16aed6a1..f4fc0f189b4 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php @@ -23,6 +23,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OC\ServerNotAvailableException; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; @@ -68,7 +69,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return true; } return false; @@ -87,7 +88,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -106,7 +107,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -125,7 +126,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -144,7 +145,7 @@ class IntegrationTestConnect extends AbstractIntegrationTest { ]); try { $this->connection->getConnectionResource(); - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { return false; } return true; @@ -161,6 +162,11 @@ class IntegrationTestConnect extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestConnect($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php index eb4a0a5c9cf..ebbe2197504 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php @@ -61,6 +61,11 @@ class IntegrationTestCountUsersByLoginName extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestCountUsersByLoginName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php index 25b7cf83f99..5dda79c2ec0 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php @@ -47,7 +47,7 @@ class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest { $this->mapping = new UserMapping(\OC::$server->getDatabaseConnection()); $this->mapping->clear(); $this->access->setUserMapper($this->mapping); - $this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); } /** @@ -74,6 +74,11 @@ class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest { } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestFetchUsersByLoginName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php index 2f14b0d1c1b..44ee1c3bb5c 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php @@ -44,7 +44,7 @@ class IntegrationTestPaging extends AbstractIntegrationTest { require(__DIR__ . '/../setup-scripts/createExplicitUsers.php'); parent::init(); - $this->backend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); } /** @@ -76,6 +76,11 @@ class IntegrationTestPaging extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestPaging($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php index 76f46385314..9226c56ee89 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php @@ -23,10 +23,13 @@ namespace OCA\User_LDAP\Tests\Integration\Lib; +use OCA\User_LDAP\FilesystemHelper; +use OCA\User_LDAP\LogWrapper; use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; +use OCP\Image; require_once __DIR__ . '/../Bootstrap.php'; @@ -68,10 +71,10 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { protected function initUserManager() { $this->userManager = new LDAPUserManager( \OC::$server->getConfig(), - new \OCA\User_LDAP\FilesystemHelper(), - new \OCA\User_LDAP\LogWrapper(), + new FilesystemHelper(), + new LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image(), + new Image(), \OC::$server->getDatabaseConnection(), \OC::$server->getUserManager(), \OC::$server->getNotificationManager() @@ -170,6 +173,11 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserHome($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php index 3fb5a67591b..1710f519158 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php @@ -25,9 +25,14 @@ namespace OCA\User_LDAP\Tests\Integration\Lib\User; +use OCA\User_LDAP\FilesystemHelper; +use OCA\User_LDAP\LogWrapper; +use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\User; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; +use OCA\User_LDAP\User_LDAP; +use OCP\Image; require_once __DIR__ . '/../../Bootstrap.php'; @@ -45,7 +50,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { $this->mapping = new UserMapping(\OC::$server->getDatabaseConnection()); $this->mapping->clear(); $this->access->setUserMapper($this->mapping); - $userBackend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); + $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager()); \OC_User::useBackend($userBackend); } @@ -123,12 +128,12 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { } protected function initUserManager() { - $this->userManager = new \OCA\User_LDAP\User\Manager( + $this->userManager = new Manager( \OC::$server->getConfig(), - new \OCA\User_LDAP\FilesystemHelper(), - new \OCA\User_LDAP\LogWrapper(), + new FilesystemHelper(), + new LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image(), + new Image(), \OC::$server->getDatabaseConnection(), \OC::$server->getUserManager(), \OC::$server->getNotificationManager() @@ -149,6 +154,11 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserAvatar($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php index 616bf410e04..886b0b46f0e 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php @@ -101,6 +101,11 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest { } } +/** @var string $host */ +/** @var int $port */ +/** @var string $adn */ +/** @var string $apwd */ +/** @var string $bdn */ $test = new IntegrationTestUserDisplayName($host, $port, $adn, $apwd, $bdn); $test->init(); $test->run(); |