Applied latest styleCI changes

This commit is contained in:
Dan Brown 2022-03-25 11:14:27 +00:00
parent d2b49084b0
commit 2325a307a5
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
3 changed files with 11 additions and 11 deletions

View file

@ -58,13 +58,13 @@ class LdapSessionGuard extends ExternalBaseSessionGuard
* Attempt to authenticate a user using the given credentials. * Attempt to authenticate a user using the given credentials.
* *
* @param array $credentials * @param array $credentials
* @param bool $remember * @param bool $remember
* *
* @return bool
* @throws LdapException*@throws \BookStack\Exceptions\JsonDebugException * @throws LdapException*@throws \BookStack\Exceptions\JsonDebugException
*
* @throws LoginAttemptException * @throws LoginAttemptException
* @throws JsonDebugException * @throws JsonDebugException
*
* @return bool
*/ */
public function attempt(array $credentials = [], $remember = false) public function attempt(array $credentials = [], $remember = false)
{ {

View file

@ -295,8 +295,8 @@ class LdapService
if ($this->config['dump_user_groups']) { if ($this->config['dump_user_groups']) {
throw new JsonDebugException([ throw new JsonDebugException([
'details_from_ldap' => $user, 'details_from_ldap' => $user,
'parsed_direct_user_groups' => $userGroups, 'parsed_direct_user_groups' => $userGroups,
'parsed_recursive_user_groups' => $allGroups, 'parsed_recursive_user_groups' => $allGroups,
]); ]);
} }

View file

@ -367,7 +367,7 @@ class LdapTest extends TestCase
$this->mockLdap->shouldReceive('searchAndGetEntries')->times(4) $this->mockLdap->shouldReceive('searchAndGetEntries')->times(4)
->with($this->resourceId, config('services.ldap.base_dn'), \Mockery::type('string'), \Mockery::type('array')) ->with($this->resourceId, config('services.ldap.base_dn'), \Mockery::type('string'), \Mockery::type('array'))
->andReturn($userResp, ['count' => 1, ->andReturn($userResp, ['count' => 1,
0 => [ 0 => [
'dn' => 'dc=test,' . config('services.ldap.base_dn'), 'dn' => 'dc=test,' . config('services.ldap.base_dn'),
'memberof' => [ 'memberof' => [
'count' => 1, 'count' => 1,
@ -376,13 +376,13 @@ class LdapTest extends TestCase
], ],
], [ ], [
'count' => 1, 'count' => 1,
0 => [ 0 => [
'dn' => 'cn=ldaptester,ou=groups,dc=example,dc=com', 'dn' => 'cn=ldaptester,ou=groups,dc=example,dc=com',
'memberof' => [ 'memberof' => [
'count' => 1, 'count' => 1,
0 => 'cn=monsters,ou=groups,dc=example,dc=com', 0 => 'cn=monsters,ou=groups,dc=example,dc=com',
], ],
] ],
], ['count' => 0]); ], ['count' => 0]);
$resp = $this->mockUserLogin(); $resp = $this->mockUserLogin();
@ -390,9 +390,9 @@ class LdapTest extends TestCase
'details_from_ldap' => [ 'details_from_ldap' => [
'dn' => 'dc=test,' . config('services.ldap.base_dn'), 'dn' => 'dc=test,' . config('services.ldap.base_dn'),
'memberof' => [ 'memberof' => [
0 => 'cn=ldaptester,ou=groups,dc=example,dc=com', 0 => 'cn=ldaptester,ou=groups,dc=example,dc=com',
'count' => 1, 'count' => 1,
] ],
], ],
'parsed_direct_user_groups' => [ 'parsed_direct_user_groups' => [
'ldaptester', 'ldaptester',