From af6b0ecec0e9530fa1a6094f374b8ebca3b3906d Mon Sep 17 00:00:00 2001
From: Arthur Schiwon <blizzz@arthur-schiwon.de>
Date: Fri, 27 Nov 2020 19:34:35 +0100
Subject: [PATCH] php-cs happyness

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
---
 apps/user_ldap/tests/Group_LDAPTest.php | 94 ++++++++++++-------------
 1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php
index 63de2ee9481..bc582ab90b5 100644
--- a/apps/user_ldap/tests/Group_LDAPTest.php
+++ b/apps/user_ldap/tests/Group_LDAPTest.php
@@ -50,6 +50,47 @@ use Test\TestCase;
  * @package OCA\User_LDAP\Tests
  */
 class Group_LDAPTest extends TestCase {
+	public function testCountEmptySearchString() {
+		$access = $this->getAccessMock();
+		$pluginManager = $this->getPluginManagerMock();
+		$groupDN = 'cn=group,dc=foo,dc=bar';
+
+		$this->enableGroups($access);
+
+		$access->expects($this->any())
+			->method('groupname2dn')
+			->willReturn($groupDN);
+		$access->expects($this->any())
+			->method('readAttribute')
+			->willReturnCallback(function ($dn) use ($groupDN) {
+				if ($dn === $groupDN) {
+					return [
+						'uid=u11,ou=users,dc=foo,dc=bar',
+						'uid=u22,ou=users,dc=foo,dc=bar',
+						'uid=u33,ou=users,dc=foo,dc=bar',
+						'uid=u34,ou=users,dc=foo,dc=bar'
+					];
+				}
+				return [];
+			});
+		$access->expects($this->any())
+			->method('isDNPartOfBase')
+			->willReturn(true);
+		// for primary groups
+		$access->expects($this->once())
+			->method('countUsers')
+			->willReturn(2);
+
+		$access->userManager->expects($this->any())
+			->method('getAttributes')
+			->willReturn(['displayName', 'mail']);
+
+		$groupBackend = new GroupLDAP($access, $pluginManager);
+		$users = $groupBackend->countUsersInGroup('group');
+
+		$this->assertSame(6, $users);
+	}
+
 	/**
 	 * @return MockObject|Access
 	 */
@@ -98,47 +139,6 @@ class Group_LDAPTest extends TestCase {
 			});
 	}
 
-	public function testCountEmptySearchString() {
-		$access = $this->getAccessMock();
-		$pluginManager = $this->getPluginManagerMock();
-		$groupDN = 'cn=group,dc=foo,dc=bar';
-
-		$this->enableGroups($access);
-
-		$access->expects($this->any())
-			->method('groupname2dn')
-			->willReturn($groupDN);
-		$access->expects($this->any())
-			->method('readAttribute')
-			->willReturnCallback(function ($dn) use ($groupDN) {
-				if ($dn === $groupDN) {
-					return [
-						'uid=u11,ou=users,dc=foo,dc=bar',
-						'uid=u22,ou=users,dc=foo,dc=bar',
-						'uid=u33,ou=users,dc=foo,dc=bar',
-						'uid=u34,ou=users,dc=foo,dc=bar'
-					];
-				}
-				return [];
-			});
-		$access->expects($this->any())
-			->method('isDNPartOfBase')
-			->willReturn(true);
-		// for primary groups
-		$access->expects($this->once())
-			->method('countUsers')
-			->willReturn(2);
-
-		$access->userManager->expects($this->any())
-			->method('getAttributes')
-			->willReturn(['displayName', 'mail']);
-
-		$groupBackend = new GroupLDAP($access, $pluginManager);
-		$users = $groupBackend->countUsersInGroup('group');
-
-		$this->assertSame(6, $users);
-	}
-
 	public function testCountWithSearchString() {
 		$access = $this->getAccessMock();
 		$pluginManager = $this->getPluginManagerMock();
@@ -503,7 +503,7 @@ class Group_LDAPTest extends TestCase {
 		$groupBackend->inGroup($uid, $gid);
 	}
 
-	public function  groupWithMembersProvider() {
+	public function groupWithMembersProvider() {
 		return [
 			[
 				'someGroup',
@@ -539,7 +539,7 @@ class Group_LDAPTest extends TestCase {
 					case 'ldapDynamicGroupMemberURL':
 						return '';
 					case 'hasPrimaryGroups':
-					case 'ldapNestedGroups';
+					case 'ldapNestedGroups':
 						return 0;
 					default:
 						return 1;
@@ -585,7 +585,7 @@ class Group_LDAPTest extends TestCase {
 					case 'ldapDynamicGroupMemberURL':
 						return '';
 					case 'hasPrimaryGroups':
-					case 'ldapNestedGroups';
+					case 'ldapNestedGroups':
 						return 0;
 					default:
 						return 1;
@@ -641,7 +641,7 @@ class Group_LDAPTest extends TestCase {
 					case 'ldapLoginFilter':
 						return 'uid=%uid';
 					case 'hasPrimaryGroups':
-					case 'ldapNestedGroups';
+					case 'ldapNestedGroups':
 						return 0;
 					default:
 						return 1;
@@ -894,8 +894,8 @@ class Group_LDAPTest extends TestCase {
 
 	public function nestedGroupsProvider(): array {
 		return [
-			[ true ],
-			[ false ],
+			[true],
+			[false],
 		];
 	}
 
-- 
GitLab