diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index 6a67e2a1fd0a550550e6781e3d16e2ad5b41301d..656c9d515756d836e88188dd1d905e45c780297f 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -58,7 +58,7 @@ $userManager = new \OCA\User_LDAP\User\Manager( \OC::$server->getDatabaseConnection(), \OC::$server->getUserManager()); -$access = new \OCA\user_ldap\lib\Access($con, $ldapWrapper, $userManager); +$access = new \OCA\User_LDAP\Access($con, $ldapWrapper, $userManager); $wizard = new \OCA\User_LDAP\Wizard($configuration, $ldapWrapper, $access); diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 98eb10080d77e60853091a74efe320b4c57b59cb..a80088bdd20aafc9d04f39c76af94a467d910493 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -42,7 +42,7 @@ if(count($configPrefixes) === 1) { \OC::$server->getUserManager() ); $connector = new OCA\User_LDAP\Connection($ldapWrapper, $configPrefixes[0]); - $ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper, $userManager); + $ldapAccess = new OCA\User_LDAP\Access($connector, $ldapWrapper, $userManager); $ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc)); $ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc)); diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/Access.php similarity index 99% rename from apps/user_ldap/lib/access.php rename to apps/user_ldap/lib/Access.php index 025f571086247958921bfa44048086e410fa7885..8137deb023d429b44a5222d726057b6916dbde47 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/Access.php @@ -35,11 +35,8 @@ * */ -namespace OCA\user_ldap\lib; +namespace OCA\User_LDAP; -use OCA\User_LDAP\Connection; -use OCA\User_LDAP\ILDAPWrapper; -use OCA\User_LDAP\LDAPUtility; use OCA\User_LDAP\User\IUserTools; use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\OfflineUser; @@ -47,7 +44,7 @@ use OCA\User_LDAP\Mapping\AbstractMapping; /** * Class Access - * @package OCA\user_ldap\lib + * @package OCA\User_LDAP */ class Access extends LDAPUtility implements IUserTools { /** diff --git a/apps/user_ldap/lib/BackendUtility.php b/apps/user_ldap/lib/BackendUtility.php index e00a0e8888a932d837c0489f9c9de6b5e01eeb9e..fc4efe2892424570841e2e3d0b6f11bbd533d6a8 100644 --- a/apps/user_ldap/lib/BackendUtility.php +++ b/apps/user_ldap/lib/BackendUtility.php @@ -24,8 +24,6 @@ namespace OCA\User_LDAP; -use OCA\user_ldap\lib\Access; - abstract class BackendUtility { protected $access; diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index d389610b6415c7d8fc1e505538647c1488269356..39b2e9ff446e818b6358ff2fe7e6f8d8d5a152c8 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -34,7 +34,6 @@ namespace OCA\User_LDAP; -use OCA\user_ldap\lib\Access; class Group_LDAP extends BackendUtility implements \OCP\GroupInterface { protected $enabled = false; diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php index d263e9a4383445afe206fc03b9f4219986631826..ce1a67b29dea304dfceacf265650349f8db1bd94 100644 --- a/apps/user_ldap/lib/Proxy.php +++ b/apps/user_ldap/lib/Proxy.php @@ -28,7 +28,6 @@ namespace OCA\User_LDAP; -use OCA\user_ldap\lib\Access; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\Mapping\GroupMapping; diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 185e522b52926515a2f703f9b37a0c6f60237c50..1000f3ba530cc77c6c8b0e431e1fa630b5dc1a32 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -32,7 +32,6 @@ namespace OCA\User_LDAP; use OC\User\NoUserException; -use OCA\user_ldap\lib\Access; use OCA\User_LDAP\User\OfflineUser; use OCA\User_LDAP\User\User; use OCP\IConfig; @@ -45,7 +44,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn protected $ocConfig; /** - * @param \OCA\user_ldap\lib\Access $access + * @param Access $access * @param \OCP\IConfig $ocConfig */ public function __construct(Access $access, IConfig $ocConfig) { diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index c63bf903d82a396556eeccf3881aaf734a85e66d..f8c82a297016c860bfc3bd1c120ae6de6ac3a1e6 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -32,7 +32,6 @@ namespace OCA\User_LDAP; use OC\ServerNotAvailableException; -use OCA\user_ldap\lib\Access; class Wizard extends LDAPUtility { static protected $l; @@ -59,6 +58,7 @@ class Wizard extends LDAPUtility { * Constructor * @param Configuration $configuration an instance of Configuration * @param ILDAPWrapper $ldap an instance of ILDAPWrapper + * @param Access $access */ public function __construct(Configuration $configuration, ILDAPWrapper $ldap, Access $access) { parent::__construct($ldap); diff --git a/apps/user_ldap/tests/GroupLDAPTest.php b/apps/user_ldap/tests/GroupLDAPTest.php index b8aa4ff559152439932bda0ce654092df5b11574..57c22f8bda17279320602965caa6c95f1adc02f1 100644 --- a/apps/user_ldap/tests/GroupLDAPTest.php +++ b/apps/user_ldap/tests/GroupLDAPTest.php @@ -27,8 +27,8 @@ namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\Group_LDAP as GroupLDAP; -use \OCA\user_ldap\lib\Access; -use \OCA\User_LDAP\Connection; +use OCA\User_LDAP\Access; +use OCA\User_LDAP\Connection; /** * Class GroupLDAPTest @@ -44,7 +44,7 @@ class GroupLDAPTest extends \Test\TestCase { if(is_null($conMethods) || is_null($accMethods)) { $conMethods = get_class_methods('\OCA\User_LDAP\Connection'); - $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); + $accMethods = get_class_methods('\OCA\User_LDAP\Access'); } $lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper'); $connector = $this->getMock('\OCA\User_LDAP\Connection', @@ -53,7 +53,7 @@ class GroupLDAPTest extends \Test\TestCase { $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') ->disableOriginalConstructor() ->getMock(); - $access = $this->getMock('\OCA\user_ldap\lib\Access', + $access = $this->getMock('\OCA\User_LDAP\Access', $accMethods, array($connector, $lw, $um)); diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index 9d165c7f29ec80406e64847774e0360c5fbbcf8a..12ebc7227a108444ba4c135f2b7ce2891b7128f2 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -56,7 +56,7 @@ class UserTest extends \Test\TestCase { if(is_null($conMethods) || is_null($accMethods)) { $conMethods = get_class_methods('\OCA\User_LDAP\Connection'); - $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); + $accMethods = get_class_methods('\OCA\User_LDAP\Access'); //getConnection shall not be replaced unset($accMethods[array_search('getConnection', $accMethods)]); $umMethods = get_class_methods('\OCA\User_LDAP\User\Manager'); @@ -70,7 +70,7 @@ class UserTest extends \Test\TestCase { $umMethods, array($cfMock, $fsMock, $logMock, $avaMgr, $im, $dbc, $userMgr)); $connector = $this->getMock('\OCA\User_LDAP\Connection', $conMethods, array($lw, null, null)); - $access = $this->getMock('\OCA\user_ldap\lib\Access', + $access = $this->getMock('\OCA\User_LDAP\Access', $accMethods, array($connector, $lw, $um)); return array($access, $connector); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 748b8f83706823dbf238ff30c2a7cc6eeb1e6843..b4d346470d359de6e16cf16058fc3532b1430e1c 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -28,7 +28,7 @@ namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\User_LDAP as UserLDAP; -use \OCA\user_ldap\lib\Access; +use \OCA\User_LDAP\Access; use \OCA\User_LDAP\Connection; /** @@ -57,7 +57,7 @@ class User_LDAPTest extends \Test\TestCase { if(is_null($conMethods) || is_null($accMethods)) { $conMethods = get_class_methods('\OCA\User_LDAP\Connection'); - $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); + $accMethods = get_class_methods('\OCA\User_LDAP\Access'); unset($accMethods[array_search('getConnection', $accMethods)]); $uMethods = get_class_methods('\OCA\User_LDAP\User\User'); unset($uMethods[array_search('getUsername', $uMethods)]); @@ -92,7 +92,7 @@ class User_LDAPTest extends \Test\TestCase { ->method('getDeletedUser') ->will($this->returnValue($offlineUser)); - $access = $this->getMock('\OCA\user_ldap\lib\Access', + $access = $this->getMock('\OCA\User_LDAP\Access', $accMethods, array($connector, $lw, $um)); @@ -126,8 +126,8 @@ class User_LDAPTest extends \Test\TestCase { /** * Prepares the Access mock for checkPassword tests - * @param \OCA\user_ldap\lib\Access $access mock - * @param bool noDisplayName + * @param \OCA\User_LDAP\Access $access mock + * @param bool $noDisplayName * @return void */ private function prepareAccessForCheckPassword(&$access, $noDisplayName = false) { @@ -295,7 +295,7 @@ class User_LDAPTest extends \Test\TestCase { /** * Prepares the Access mock for getUsers tests - * @param \OCA\user_ldap\lib\Access $access mock + * @param \OCA\User_LDAP\Access $access mock * @return void */ private function prepareAccessForGetUsers(&$access) { diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index d962e057911003c4b8b2ea1e80b5eaebecda0348..d6ee5a473b2fb88266f5d1cea5704428c54c5141 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -28,7 +28,7 @@ namespace OCA\User_LDAP\tests; use \OCA\User_LDAP\Wizard; // use \OCA\User_LDAP\User_LDAP as UserLDAP; -// use \OCA\user_ldap\lib\Access; +// use \OCA\User_LDAP\Access; // use \OCA\User_LDAP\Configuration; // use \OCA\User_LDAP\ILDAPWrapper; @@ -61,7 +61,7 @@ class WizardTest extends \Test\TestCase { if(is_null($confMethods)) { $confMethods = get_class_methods('\OCA\User_LDAP\Configuration'); $connMethods = get_class_methods('\OCA\User_LDAP\Connection'); - $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); + $accMethods = get_class_methods('\OCA\User_LDAP\Access'); } $lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper'); $conf = $this->getMock('\OCA\User_LDAP\Configuration', @@ -73,7 +73,7 @@ class WizardTest extends \Test\TestCase { $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') ->disableOriginalConstructor() ->getMock(); - $access = $this->getMock('\OCA\user_ldap\lib\Access', + $access = $this->getMock('\OCA\User_LDAP\Access', $accMethods, array($connector, $lw, $um)); return array(new Wizard($conf, $lw, $access), $conf, $lw, $access); diff --git a/apps/user_ldap/tests/access.php b/apps/user_ldap/tests/access.php index 1578e0ffad216f86e3eeef572833f3060f70f839..b1401b7c9bbaef76e6da41407d0db7d14d9147df 100644 --- a/apps/user_ldap/tests/access.php +++ b/apps/user_ldap/tests/access.php @@ -25,8 +25,8 @@ namespace OCA\user_ldap\tests; -use \OCA\user_ldap\lib\Access; -use \OCA\User_LDAP\Connection; +use OCA\User_LDAP\Access; +use OCA\User_LDAP\Connection; /** * Class Test_Access @@ -43,7 +43,7 @@ class Test_Access extends \Test\TestCase { if(is_null($conMethods) || is_null($accMethods)) { $conMethods = get_class_methods('\OCA\User_LDAP\Connection'); - $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); + $accMethods = get_class_methods('\OCA\User_LDAP\Access'); $umMethods = get_class_methods('\OCA\User_LDAP\User\Manager'); } $lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper'); diff --git a/apps/user_ldap/tests/integration/abstractintegrationtest.php b/apps/user_ldap/tests/integration/abstractintegrationtest.php index e5ecad75ba05091146c7450382b3de9fb4e11d66..7b3d7b171c4f1f6f0a64afebae2c234fb3edb980 100644 --- a/apps/user_ldap/tests/integration/abstractintegrationtest.php +++ b/apps/user_ldap/tests/integration/abstractintegrationtest.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration; -use OCA\user_ldap\lib\Access; +use OCA\User_LDAP\Access; use OCA\User_LDAP\Connection; use OCA\User_LDAP\LDAP; use OCA\User_LDAP\User\Manager;