aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-11-23 10:22:34 +0100
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2023-11-23 10:36:13 +0100
commitaa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch)
tree843203cd1346158aab3515687e37a90e78c929e9 /apps/user_ldap
parent272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff)
downloadnextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz
nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/ajax/clearMappings.php2
-rw-r--r--apps/user_ldap/lib/Access.php12
-rw-r--r--apps/user_ldap/lib/AppInfo/Application.php2
-rw-r--r--apps/user_ldap/lib/Command/CheckUser.php18
-rw-r--r--apps/user_ldap/lib/Command/DeleteConfig.php8
-rw-r--r--apps/user_ldap/lib/Command/Search.php42
-rw-r--r--apps/user_ldap/lib/Command/SetConfig.php24
-rw-r--r--apps/user_ldap/lib/Command/ShowConfig.php30
-rw-r--r--apps/user_ldap/lib/Command/UpdateUUID.php27
-rw-r--r--apps/user_ldap/lib/DataCollector/LdapDataCollector.php4
-rw-r--r--apps/user_ldap/lib/GroupPluginManager.php2
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php2
-rw-r--r--apps/user_ldap/lib/Helper.php2
-rw-r--r--apps/user_ldap/lib/Jobs/CleanUp.php4
-rw-r--r--apps/user_ldap/lib/Jobs/UpdateGroups.php2
-rw-r--r--apps/user_ldap/lib/LDAP.php4
-rw-r--r--apps/user_ldap/lib/Migration/GroupMappingMigration.php2
-rw-r--r--apps/user_ldap/lib/Migration/SetDefaultProvider.php2
-rw-r--r--apps/user_ldap/lib/Migration/UUIDFixUser.php2
-rw-r--r--apps/user_ldap/lib/Migration/Version1010Date20200630192842.php2
-rw-r--r--apps/user_ldap/lib/Migration/Version1120Date20210917155206.php1
-rw-r--r--apps/user_ldap/lib/User/Manager.php2
-rw-r--r--apps/user_ldap/lib/User/User.php4
-rw-r--r--apps/user_ldap/lib/User_Proxy.php2
-rw-r--r--apps/user_ldap/lib/Wizard.php6
-rw-r--r--apps/user_ldap/tests/Group_LDAPTest.php2
-rw-r--r--apps/user_ldap/tests/Migration/UUIDFixInsertTest.php4
-rw-r--r--apps/user_ldap/tests/UserLDAPPluginTest.php4
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php2
29 files changed, 110 insertions, 110 deletions
diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php
index f8469cc85b1..395e3ec3016 100644
--- a/apps/user_ldap/ajax/clearMappings.php
+++ b/apps/user_ldap/ajax/clearMappings.php
@@ -23,8 +23,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Mapping\GroupMapping;
+use OCA\User_LDAP\Mapping\UserMapping;
// Check user and app status
\OC_JSON::checkAdminUser();
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 90c2d72a2ff..e608d5f80f0 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -2016,12 +2016,12 @@ class Access extends LDAPUtility {
}
$this->logger->debug('Ready for a paged search', ['app' => 'user_ldap']);
return [true, $pageSize, $this->lastCookie];
- /* ++ Fixing RHDS searches with pages with zero results ++
- * We couldn't get paged searches working with our RHDS for login ($limit = 0),
- * due to pages with zero results.
- * So we added "&& !empty($this->lastCookie)" to this test to ignore pagination
- * if we don't have a previous paged search.
- */
+ /* ++ Fixing RHDS searches with pages with zero results ++
+ * We couldn't get paged searches working with our RHDS for login ($limit = 0),
+ * due to pages with zero results.
+ * So we added "&& !empty($this->lastCookie)" to this test to ignore pagination
+ * if we don't have a previous paged search.
+ */
} elseif ($this->lastCookie !== '') {
// a search without limit was requested. However, if we do use
// Paged Search once, we always must do it. This requires us to
diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php
index 459de751812..e46d77b8066 100644
--- a/apps/user_ldap/lib/AppInfo/Application.php
+++ b/apps/user_ldap/lib/AppInfo/Application.php
@@ -40,10 +40,10 @@ use OCA\User_LDAP\ILDAPWrapper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\LoginListener;
use OCA\User_LDAP\Notification\Notifier;
+use OCA\User_LDAP\SetupChecks\LdapInvalidUuids;
use OCA\User_LDAP\User\Manager;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\UserPluginManager;
-use OCA\User_LDAP\SetupChecks\LdapInvalidUuids;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php
index 6ccfc9c19ea..1174408cb49 100644
--- a/apps/user_ldap/lib/Command/CheckUser.php
+++ b/apps/user_ldap/lib/Command/CheckUser.php
@@ -62,16 +62,16 @@ class CheckUser extends Command {
->setName('ldap:check-user')
->setDescription('checks whether a user exists on LDAP.')
->addArgument(
- 'ocName',
- InputArgument::REQUIRED,
- 'the user name as used in Nextcloud, or the LDAP DN'
- )
+ 'ocName',
+ InputArgument::REQUIRED,
+ 'the user name as used in Nextcloud, or the LDAP DN'
+ )
->addOption(
- 'force',
- null,
- InputOption::VALUE_NONE,
- 'ignores disabled LDAP configuration'
- )
+ 'force',
+ null,
+ InputOption::VALUE_NONE,
+ 'ignores disabled LDAP configuration'
+ )
->addOption(
'update',
null,
diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php
index 707fd455611..8da77c29671 100644
--- a/apps/user_ldap/lib/Command/DeleteConfig.php
+++ b/apps/user_ldap/lib/Command/DeleteConfig.php
@@ -47,10 +47,10 @@ class DeleteConfig extends Command {
->setName('ldap:delete-config')
->setDescription('deletes an existing LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::REQUIRED,
- 'the configuration ID'
- )
+ 'configID',
+ InputArgument::REQUIRED,
+ 'the configuration ID'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php
index 96c4df4b2bf..748bf873e64 100644
--- a/apps/user_ldap/lib/Command/Search.php
+++ b/apps/user_ldap/lib/Command/Search.php
@@ -58,30 +58,30 @@ class Search extends Command {
->setName('ldap:search')
->setDescription('executes a user or group search')
->addArgument(
- 'search',
- InputArgument::REQUIRED,
- 'the search string (can be empty)'
- )
+ 'search',
+ InputArgument::REQUIRED,
+ 'the search string (can be empty)'
+ )
->addOption(
- 'group',
- null,
- InputOption::VALUE_NONE,
- 'searches groups instead of users'
- )
+ 'group',
+ null,
+ InputOption::VALUE_NONE,
+ 'searches groups instead of users'
+ )
->addOption(
- 'offset',
- null,
- InputOption::VALUE_REQUIRED,
- 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.',
- '0'
- )
+ 'offset',
+ null,
+ InputOption::VALUE_REQUIRED,
+ 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.',
+ '0'
+ )
->addOption(
- 'limit',
- null,
- InputOption::VALUE_REQUIRED,
- 'limit the results. 0 means no limit, defaults to 15',
- '15'
- )
+ 'limit',
+ null,
+ InputOption::VALUE_REQUIRED,
+ 'limit the results. 0 means no limit, defaults to 15',
+ '15'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php
index 2b487787c8a..8cf100ecd0a 100644
--- a/apps/user_ldap/lib/Command/SetConfig.php
+++ b/apps/user_ldap/lib/Command/SetConfig.php
@@ -40,20 +40,20 @@ class SetConfig extends Command {
->setName('ldap:set-config')
->setDescription('modifies an LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::REQUIRED,
- 'the configuration ID'
- )
+ 'configID',
+ InputArgument::REQUIRED,
+ 'the configuration ID'
+ )
->addArgument(
- 'configKey',
- InputArgument::REQUIRED,
- 'the configuration key'
- )
+ 'configKey',
+ InputArgument::REQUIRED,
+ 'the configuration key'
+ )
->addArgument(
- 'configValue',
- InputArgument::REQUIRED,
- 'the new configuration value'
- )
+ 'configValue',
+ InputArgument::REQUIRED,
+ 'the new configuration value'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php
index 4997d9737a5..6ff30739217 100644
--- a/apps/user_ldap/lib/Command/ShowConfig.php
+++ b/apps/user_ldap/lib/Command/ShowConfig.php
@@ -52,23 +52,23 @@ class ShowConfig extends Base {
->setName('ldap:show-config')
->setDescription('shows the LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::OPTIONAL,
- 'will show the configuration of the specified id'
- )
+ 'configID',
+ InputArgument::OPTIONAL,
+ 'will show the configuration of the specified id'
+ )
->addOption(
- 'show-password',
- null,
- InputOption::VALUE_NONE,
- 'show ldap bind password'
- )
+ 'show-password',
+ null,
+ InputOption::VALUE_NONE,
+ 'show ldap bind password'
+ )
->addOption(
- 'output',
- null,
- InputOption::VALUE_OPTIONAL,
- 'Output format (table, plain, json or json_pretty, default is table)',
- 'table'
- )
+ 'output',
+ null,
+ InputOption::VALUE_OPTIONAL,
+ 'Output format (table, plain, json or json_pretty, default is table)',
+ 'table'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/UpdateUUID.php b/apps/user_ldap/lib/Command/UpdateUUID.php
index 716bc2d0563..57863a11ec8 100644
--- a/apps/user_ldap/lib/Command/UpdateUUID.php
+++ b/apps/user_ldap/lib/Command/UpdateUUID.php
@@ -42,12 +42,12 @@ use Symfony\Component\Console\Output\OutputInterface;
use function sprintf;
class UuidUpdateReport {
- const UNCHANGED = 0;
- const UNKNOWN = 1;
- const UNREADABLE = 2;
- const UPDATED = 3;
- const UNWRITABLE = 4;
- const UNMAPPED = 5;
+ public const UNCHANGED = 0;
+ public const UNKNOWN = 1;
+ public const UNREADABLE = 2;
+ public const UPDATED = 3;
+ public const UNWRITABLE = 4;
+ public const UNMAPPED = 5;
public $id = '';
public $dn = '';
@@ -178,7 +178,7 @@ class UpdateUUID extends Command {
if (!empty($report->id)) {
$output->writeln(sprintf(' %s: %s',
$report->isUser ? 'User' : 'Group', $report->id));
- } else if (!empty($report->dn)) {
+ } elseif (!empty($report->dn)) {
$output->writeln(sprintf(' DN: %s', $report->dn));
}
}
@@ -190,7 +190,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNKNOWN] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
$output->writeln(PHP_EOL . 'Old users can be removed along with their data per occ user:delete.' . PHP_EOL);
}
@@ -201,7 +201,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNREADABLE] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
}
}
@@ -211,7 +211,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNWRITABLE] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
}
}
@@ -222,7 +222,7 @@ class UpdateUUID extends Command {
foreach($this->handleMappingBasedUpdates(false) as $_) {
yield;
}
- } else if ($input->getOption('userId')
+ } elseif ($input->getOption('userId')
|| $input->getOption('groupId')
|| $input->getOption('dn')
) {
@@ -326,8 +326,7 @@ class UpdateUUID extends Command {
foreach ($list as $row) {
$access = $backendProxy->getLDAPAccess($row['name']);
if ($access instanceof Access
- && $dn = $mapping->getDNByName($row['name']))
- {
+ && $dn = $mapping->getDNByName($row['name'])) {
if ($uuid = $access->getUUID($dn, $isUser)) {
if ($uuid !== $row['uuid']) {
if ($this->dryRun || $mapping->setUUIDbyDN($uuid, $dn)) {
@@ -359,7 +358,7 @@ class UpdateUUID extends Command {
protected function estimateNumberOfUpdates(InputInterface $input): int {
if ($input->getOption('all')) {
return $this->userMapping->count() + $this->groupMapping->count();
- } else if ($input->getOption('userId')
+ } elseif ($input->getOption('userId')
|| $input->getOption('groupId')
|| $input->getOption('dn')
) {
diff --git a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
index 833b314b199..8644626d00b 100644
--- a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
+++ b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types = 1);
+<?php
+
+declare(strict_types = 1);
/**
* @copyright 2022 Carl Schwan <carl@carlschwan.eu>
*
diff --git a/apps/user_ldap/lib/GroupPluginManager.php b/apps/user_ldap/lib/GroupPluginManager.php
index 5999409cdba..d99e17d7673 100644
--- a/apps/user_ldap/lib/GroupPluginManager.php
+++ b/apps/user_ldap/lib/GroupPluginManager.php
@@ -164,7 +164,7 @@ class GroupPluginManager {
$plugin = $this->which[GroupInterface::COUNT_USERS];
if ($plugin) {
- return $plugin->countUsersInGroup($gid,$search);
+ return $plugin->countUsersInGroup($gid, $search);
}
throw new \Exception('No plugin implements countUsersInGroup in this LDAP Backend.');
}
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index a388c4acbd5..a7a82eb88ca 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -48,10 +48,10 @@ use Exception;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\User\OfflineUser;
use OCP\Cache\CappedMemoryCache;
-use OCP\GroupInterface;
use OCP\Group\Backend\ABackend;
use OCP\Group\Backend\IDeleteGroupBackend;
use OCP\Group\Backend\IGetDisplayNameBackend;
+use OCP\GroupInterface;
use OCP\IConfig;
use OCP\IUserManager;
use OCP\Server;
diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php
index 6668338d195..057a12cc0b5 100644
--- a/apps/user_ldap/lib/Helper.php
+++ b/apps/user_ldap/lib/Helper.php
@@ -41,7 +41,7 @@ class Helper {
protected CappedMemoryCache $sanitizeDnCache;
public function __construct(IConfig $config,
- IDBConnection $connection) {
+ IDBConnection $connection) {
$this->config = $config;
$this->connection = $connection;
$this->sanitizeDnCache = new CappedMemoryCache(10000);
diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php
index be7c09bd961..f4e23446352 100644
--- a/apps/user_ldap/lib/Jobs/CleanUp.php
+++ b/apps/user_ldap/lib/Jobs/CleanUp.php
@@ -25,13 +25,13 @@
*/
namespace OCA\User_LDAP\Jobs;
-use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\BackgroundJob\TimedJob;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\User\DeletedUsersIndex;
use OCA\User_LDAP\User_LDAP;
use OCA\User_LDAP\User_Proxy;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
/**
* Class CleanUp
diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php
index 487f36f4f30..3f7ae8f21d2 100644
--- a/apps/user_ldap/lib/Jobs/UpdateGroups.php
+++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php
@@ -32,11 +32,11 @@ declare(strict_types=1);
*/
namespace OCA\User_LDAP\Jobs;
+use OCA\User_LDAP\Service\UpdateGroupsService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
use OCP\DB\Exception;
use OCP\IConfig;
-use OCA\User_LDAP\Service\UpdateGroupsService;
use Psr\Log\LoggerInterface;
class UpdateGroups extends TimedJob {
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index edaf08a7816..8e63422b1ac 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -33,11 +33,11 @@
*/
namespace OCA\User_LDAP;
-use OCP\IConfig;
-use OCP\Profiler\IProfiler;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\DataCollector\LdapDataCollector;
use OCA\User_LDAP\Exceptions\ConstraintViolationException;
+use OCP\IConfig;
+use OCP\Profiler\IProfiler;
use Psr\Log\LoggerInterface;
class LDAP implements ILDAPWrapper {
diff --git a/apps/user_ldap/lib/Migration/GroupMappingMigration.php b/apps/user_ldap/lib/Migration/GroupMappingMigration.php
index f89bebe57d6..d5d7aa367a1 100644
--- a/apps/user_ldap/lib/Migration/GroupMappingMigration.php
+++ b/apps/user_ldap/lib/Migration/GroupMappingMigration.php
@@ -60,7 +60,7 @@ abstract class GroupMappingMigration extends SimpleMigrationStep {
->setParameter('owncloud_name', $row['owncloud_name'])
->setParameter('directory_uuid', $row['directory_uuid'])
->setParameter('ldap_dn_hash', $row['ldap_dn_hash'])
- ;
+ ;
$insert->executeStatement();
}
diff --git a/apps/user_ldap/lib/Migration/SetDefaultProvider.php b/apps/user_ldap/lib/Migration/SetDefaultProvider.php
index 15dba57e5f3..fd9a79c8494 100644
--- a/apps/user_ldap/lib/Migration/SetDefaultProvider.php
+++ b/apps/user_ldap/lib/Migration/SetDefaultProvider.php
@@ -40,7 +40,7 @@ class SetDefaultProvider implements IRepairStep {
private $helper;
public function __construct(IConfig $config,
- Helper $helper) {
+ Helper $helper) {
$this->config = $config;
$this->helper = $helper;
}
diff --git a/apps/user_ldap/lib/Migration/UUIDFixUser.php b/apps/user_ldap/lib/Migration/UUIDFixUser.php
index 2cb7ac8bdfb..bd6aed44a0a 100644
--- a/apps/user_ldap/lib/Migration/UUIDFixUser.php
+++ b/apps/user_ldap/lib/Migration/UUIDFixUser.php
@@ -22,8 +22,8 @@
*/
namespace OCA\User_LDAP\Migration;
-use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\Mapping\UserMapping;
+use OCA\User_LDAP\User_Proxy;
class UUIDFixUser extends UUIDFix {
public function __construct(UserMapping $mapper, User_Proxy $proxy) {
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
index 5c7dc7db95c..8031741bc4d 100644
--- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
+++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
namespace OCA\User_LDAP\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
index b7a9b81d6a0..adc502e6747 100644
--- a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
+++ b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
@@ -31,7 +31,6 @@ use OC\Hooks\PublicEmitter;
use OCP\DB\Exception;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
-use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\IUserManager;
use OCP\Migration\IOutput;
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index f904d829c08..9d3ba333e89 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -29,9 +29,9 @@
*/
namespace OCA\User_LDAP\User;
-use OCP\Cache\CappedMemoryCache;
use OCA\User_LDAP\Access;
use OCA\User_LDAP\FilesystemHelper;
+use OCP\Cache\CappedMemoryCache;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\IDBConnection;
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index 214b475e2e4..3b0015380ec 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -37,13 +37,13 @@ use OCA\User_LDAP\Access;
use OCA\User_LDAP\Connection;
use OCA\User_LDAP\Exceptions\AttributeNotSet;
use OCA\User_LDAP\FilesystemHelper;
+use OCP\Accounts\IAccountManager;
+use OCP\Accounts\PropertyDoesNotExistException;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\Image;
use OCP\IUser;
use OCP\IUserManager;
-use OCP\Accounts\IAccountManager;
-use OCP\Accounts\PropertyDoesNotExistException;
use OCP\Notification\IManager as INotificationManager;
use OCP\Server;
use Psr\Log\LoggerInterface;
diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php
index 0449c89bd24..919cddd99be 100644
--- a/apps/user_ldap/lib/User_Proxy.php
+++ b/apps/user_ldap/lib/User_Proxy.php
@@ -38,10 +38,10 @@ use OCP\IConfig;
use OCP\IUserBackend;
use OCP\IUserSession;
use OCP\Notification\IManager as INotificationManager;
-use OCP\UserInterface;
use OCP\User\Backend\ICountMappedUsersBackend;
use OCP\User\Backend\ICountUsersBackend;
use OCP\User\Backend\IProvideEnabledStateBackend;
+use OCP\UserInterface;
use Psr\Log\LoggerInterface;
class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP, ICountUsersBackend, ICountMappedUsersBackend, IProvideEnabledStateBackend {
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index 29407ceb0a5..1f4794f164e 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -193,7 +193,7 @@ class Wizard extends LDAPUtility {
* counts users with a specified attribute
* @return int|false
*/
- public function countUsersWithAttribute(string $attr, bool $existsCheck = false) {
+ public function countUsersWithAttribute(string $attr, bool $existsCheck = false) {
$reqs = ['ldapHost', 'ldapBase', 'ldapUserFilter'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
@@ -399,7 +399,7 @@ class Wizard extends LDAPUtility {
* @return WizardResult|false the instance's WizardResult instance
* @throws \Exception
*/
- private function determineGroups(string $dbKey, string $confKey, bool $testMemberOf = true) {
+ private function determineGroups(string $dbKey, string $confKey, bool $testMemberOf = true) {
$reqs = ['ldapHost', 'ldapBase'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
@@ -636,7 +636,7 @@ class Wizard extends LDAPUtility {
* @return WizardResult|false
* @throws \Exception
*/
- public function testLoginName(string $loginName) {
+ public function testLoginName(string $loginName) {
$reqs = ['ldapHost', 'ldapBase', 'ldapUserFilter'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php
index 936d7db70f8..cc1090bf965 100644
--- a/apps/user_ldap/tests/Group_LDAPTest.php
+++ b/apps/user_ldap/tests/Group_LDAPTest.php
@@ -1030,7 +1030,7 @@ class Group_LDAPTest extends TestCase {
}
[$memberFilter] = explode('&', $filter);
if ($memberFilter === 'member='.$dn) {
- return [$group1, $group2];
+ return [$group1, $group2];
return [];
} elseif ($memberFilter === 'member='.$group2['dn'][0]) {
return [$group3];
diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
index 49431ec0d9a..6645ccc9431 100644
--- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
+++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
@@ -78,7 +78,7 @@ class UUIDFixInsertTest extends TestCase {
$userBatches = [
0 => array_fill(0, 50, $record),
1 => array_fill(0, 50, $record),
- 2 => array_fill(0, 13, $record),
+ 2 => array_fill(0, 13, $record),
];
$groupBatches = [
@@ -152,7 +152,7 @@ class UUIDFixInsertTest extends TestCase {
$this->userMapper->expects($this->exactly(5))
->method('getList')
->withConsecutive([0, 50], [0, 40], [0, 32], [32, 32], [64, 32])
- ->willReturnOnConsecutiveCalls($userBatches[0], $userBatches[1], $userBatches[2], $userBatches[3], $userBatches[4]);
+ ->willReturnOnConsecutiveCalls($userBatches[0], $userBatches[1], $userBatches[2], $userBatches[3], $userBatches[4]);
$this->groupMapper->expects($this->once())
->method('getList')
diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php
index 98d9c409027..f2bc8bc69d8 100644
--- a/apps/user_ldap/tests/UserLDAPPluginTest.php
+++ b/apps/user_ldap/tests/UserLDAPPluginTest.php
@@ -91,7 +91,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$this->expectExceptionMessage('No plugin implements createUser in this LDAP Backend.');
$pluginManager = $this->getUserPluginManager();
- $pluginManager->createUser('foo','bar');
+ $pluginManager->createUser('foo', 'bar');
}
public function testSetPassword() {
@@ -122,7 +122,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$this->expectExceptionMessage('No plugin implements setPassword in this LDAP Backend.');
$pluginManager = $this->getUserPluginManager();
- $pluginManager->setPassword('foo','bar');
+ $pluginManager->setPassword('foo', 'bar');
}
public function testGetHome() {
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index b561840b4a5..35c692d634f 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -48,9 +48,9 @@ use OCP\HintException;
use OCP\IConfig;
use OCP\IUser;
use OCP\Notification\IManager as INotificationManager;
-use Test\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
+use Test\TestCase;
/**
* Class Test_User_Ldap_Direct