diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-09-23 15:10:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 15:10:30 +0200 |
commit | 8927510685f59555cf337866370b572934e41408 (patch) | |
tree | a62f3441fce0ff3ea51455dba9a6ca0fc207933d /apps/user_ldap | |
parent | d4839b962bad250ab1aa1c40e16c2408ae53a8b2 (diff) | |
parent | 98efa3bda838065fb9ff5740f2688fe2b526ae2d (diff) | |
download | nextcloud-server-8927510685f59555cf337866370b572934e41408.tar.gz nextcloud-server-8927510685f59555cf337866370b572934e41408.zip |
Merge pull request #48223 from nextcloud/feat/add-rector-config
Add rector config
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/AppInfo/Application.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/tests/AccessTest.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/tests/LDAPTest.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/tests/Mapping/AbstractMappingTest.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 81f3dc6cb70..f1e47e90418 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -954,7 +954,7 @@ class Access extends LDAPUtility { }, []); $idsByDn = $this->getGroupMapper()->getListOfIdsByDn($listOfDNs); - array_walk($groupRecords, function (array $record) use ($idsByDn) { + array_walk($groupRecords, function (array $record) use ($idsByDn): void { $newlyMapped = false; $gid = $idsByDn[$record['dn'][0]] ?? null; if ($gid === null) { diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php index e3f6f56152c..ae6092ae101 100644 --- a/apps/user_ldap/lib/AppInfo/Application.php +++ b/apps/user_ldap/lib/AppInfo/Application.php @@ -110,7 +110,7 @@ class Application extends App implements IBootstrap { User_Proxy $userBackend, Group_Proxy $groupBackend, Helper $helper, - ) { + ): void { $configPrefixes = $helper->getServerConfigurationPrefixes(true); if (count($configPrefixes) > 0) { $userPluginManager = $appContainer->get(UserPluginManager::class); @@ -140,7 +140,7 @@ class Application extends App implements IBootstrap { private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher): void { $dispatcher->addListener( 'OCA\\Files_External::loadAdditionalBackends', - function () use ($appContainer) { + function () use ($appContainer): void { $storagesBackendService = $appContainer->get(BackendService::class); $storagesBackendService->registerConfigHandler('home', function () use ($appContainer) { return $appContainer->get(ExtStorageConfigHandler::class); diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index a9eeceeb86b..6deaad763f1 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -612,7 +612,7 @@ class AccessTest extends TestCase { ]; $expected = $fakeLdapEntries; unset($expected['count']); - array_walk($expected, function (&$v) { + array_walk($expected, function (&$v): void { $v['dn'] = [$v['dn']]; // dn is translated into an array internally for consistency }); diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index b7349d11b36..a29751555cb 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -38,7 +38,7 @@ class LDAPTest extends TestCase { */ public function testSearchWithErrorHandler(string $errorMessage, bool $passThrough): void { $wasErrorHandlerCalled = false; - $errorHandler = function ($number, $message, $file, $line) use (&$wasErrorHandlerCalled) { + $errorHandler = function ($number, $message, $file, $line) use (&$wasErrorHandlerCalled): void { $wasErrorHandlerCalled = true; }; @@ -48,7 +48,7 @@ class LDAPTest extends TestCase { ->expects($this->once()) ->method('invokeLDAPMethod') ->with('search', $this->anything(), $this->anything(), $this->anything(), $this->anything(), $this->anything()) - ->willReturnCallback(function () use ($errorMessage) { + ->willReturnCallback(function () use ($errorMessage): void { trigger_error($errorMessage); }); diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php index e0a31c119ba..84703e09616 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php @@ -227,7 +227,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { $callbackCalls = 0; $test = $this; - $callback = function (string $id) use ($test, &$callbackCalls) { + $callback = function (string $id) use ($test, &$callbackCalls): void { $test->assertTrue(trim($id) !== ''); $callbackCalls++; }; diff --git a/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php b/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php index b80d761b5c6..84aefb484bb 100644 --- a/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php +++ b/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php @@ -137,7 +137,7 @@ class UpdateGroupsServiceTest extends TestCase { $removedEvents = 0; $this->dispatcher->expects($this->exactly(4)) ->method('dispatchTyped') - ->willReturnCallback(function ($event) use (&$addedEvents, &$removedEvents) { + ->willReturnCallback(function ($event) use (&$addedEvents, &$removedEvents): void { if ($event instanceof UserRemovedEvent) { $removedEvents++; } elseif ($event instanceof UserAddedEvent) { |