diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2021-01-12 09:15:48 +0000 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-02-18 13:31:24 +0100 |
commit | eb502c02ff7693bb36318d857985f79e7bac370c (patch) | |
tree | 61a7a10839f0c3a19bf8af869af267c484b51e02 /apps/user_ldap | |
parent | d79cc8ea6ddc6f562ed0eeffc13cdbedf5df81bb (diff) | |
download | nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.tar.gz nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.zip |
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/lib/Controller/RenewPasswordController.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/tests/AccessTest.php | 8 | ||||
-rw-r--r-- | apps/user_ldap/tests/Mapping/AbstractMappingTest.php | 20 | ||||
-rw-r--r-- | apps/user_ldap/tests/WizardTest.php | 14 |
5 files changed, 24 insertions, 24 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index d11ca98ece9..9f317d6c642 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1254,7 +1254,7 @@ class Access extends LDAPUtility { if ($search === false) { return $counter > 0 ? $counter : false; } - list($sr, $pagedSearchOK) = $search; + [$sr, $pagedSearchOK] = $search; /* ++ Fixing RHDS searches with pages with zero results ++ * countEntriesInSearchResults() method signature changed @@ -1321,7 +1321,7 @@ class Access extends LDAPUtility { if ($search === false) { return []; } - list($sr, $pagedSearchOK) = $search; + [$sr, $pagedSearchOK] = $search; $cr = $this->connection->getConnectionResource(); if ($skipHandling) { diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index 715ca1a170c..94d180df6c8 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -93,7 +93,7 @@ class RenewPasswordController extends Controller { $errors = []; $messages = []; if (is_array($renewPasswordMessages)) { - list($errors, $messages) = $renewPasswordMessages; + [$errors, $messages] = $renewPasswordMessages; } $this->session->remove('renewPasswordMessages'); foreach ($errors as $value) { diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index a532bd6fd7a..ac7cbbe3733 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -238,7 +238,7 @@ class AccessTest extends TestCase { * @param array $case */ public function testStringResemblesDN($case) { - list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); $access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager); @@ -260,7 +260,7 @@ class AccessTest extends TestCase { * @param $case */ public function testStringResemblesDNLDAPmod($case) { - list(, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); $lw = new LDAP(); @@ -430,7 +430,7 @@ class AccessTest extends TestCase { * @param $attribute */ public function testSanitizeDN($attribute) { - list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); @@ -647,7 +647,7 @@ class AccessTest extends TestCase { } public function testFetchListOfGroupsKnown() { - $filter = 'objectClass=nextcloudGroup'; + $filter = 'objectClass=nextcloudGroup'; $attributes = ['cn', 'gidNumber', 'dn']; $base = 'ou=SomeGroups,dc=my,dc=directory'; diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php index 35259345f25..05059a50a4b 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php @@ -106,7 +106,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * Hint: successful mapping is tested inherently with mapEntries(). */ public function testMap() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); // test that mapping will not happen when it shall not $tooLongDN = 'uid=joann,ou=Secret Small Specialized Department,ou=Some Tremendously Important Department,ou=Another Very Important Department,ou=Pretty Meaningful Derpartment,ou=Quite Broad And General Department,ou=The Topmost Department,dc=hugelysuccessfulcompany,dc=com'; @@ -126,7 +126,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * mapping entries */ public function testUnmap() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { $result = $mapper->unmap($entry['name']); @@ -142,7 +142,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * and unsuccessful requests. */ public function testGetMethods() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { $fdn = $mapper->getDNByName($entry['name']); @@ -170,7 +170,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests getNamesBySearch() for successful and unsuccessful requests. */ public function testSearch() { - list($mapper,) = $this->initTest(); + [$mapper,] = $this->initTest(); $names = $mapper->getNamesBySearch('oo', '%', '%'); $this->assertTrue(is_array($names)); @@ -186,7 +186,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests setDNbyUUID() for successful and unsuccessful update. */ public function testSetDNMethod() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $newDN = 'uid=modified,dc=example,dc=org'; $done = $mapper->setDNbyUUID($newDN, $data[0]['uuid']); @@ -206,7 +206,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { */ public function testSetUUIDMethod() { /** @var AbstractMapping $mapper */ - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $newUUID = 'ABC737-DEF754'; @@ -225,7 +225,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests clear() for successful update. */ public function testClear() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $done = $mapper->clear(); $this->assertTrue($done); @@ -239,7 +239,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests clear() for successful update. */ public function testClearCb() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $callbackCalls = 0; $test = $this; @@ -262,7 +262,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests getList() method */ public function testList() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); // get all entries without specifying offset or limit $results = $mapper->getList(); @@ -284,7 +284,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { public function testGetListOfIdsByDn() { /** @var AbstractMapping $mapper */ - list($mapper,) = $this->initTest(); + [$mapper,] = $this->initTest(); $listOfDNs = []; for ($i = 0; $i < 66640; $i++) { diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 378d549bc27..25aa5d66c8f 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -98,7 +98,7 @@ class WizardTest extends TestCase { } public function testCumulativeSearchOnAttributeLimited() { - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') @@ -158,7 +158,7 @@ class WizardTest extends TestCase { } public function testCumulativeSearchOnAttributeUnlimited() { - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') @@ -234,7 +234,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeAlreadySet() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -256,7 +256,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeOverrideSet() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -295,7 +295,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeFind() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -334,7 +334,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeFindNothing() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -374,7 +374,7 @@ class WizardTest extends TestCase { public function testCumulativeSearchOnAttributeSkipReadDN() { // tests that there is no infinite loop, when skipping already processed // DNs (they can be returned multiple times for multiple filters ) - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') |