]> BookStack Code Mirror - bookstack/commitdiff
Applied latest styleCI changes
authorDan Brown <redacted>
Fri, 25 Mar 2022 11:14:27 +0000 (11:14 +0000)
committerDan Brown <redacted>
Fri, 25 Mar 2022 11:14:27 +0000 (11:14 +0000)
app/Auth/Access/Guards/LdapSessionGuard.php
app/Auth/Access/LdapService.php
tests/Auth/LdapTest.php

index 18d4c289dbcd00222d04fd210c22b6c6a2dcfd59..e7ed22704cbd32b2c889b87cf8e6556f7c3eeec1 100644 (file)
@@ -58,13 +58,13 @@ class LdapSessionGuard extends ExternalBaseSessionGuard
      * Attempt to authenticate a user using the given credentials.
      *
      * @param array $credentials
-     * @param bool $remember
+     * @param bool  $remember
      *
-     * @return bool
      * @throws LdapException*@throws \BookStack\Exceptions\JsonDebugException
-     *
      * @throws LoginAttemptException
      * @throws JsonDebugException
+     *
+     * @return bool
      */
     public function attempt(array $credentials = [], $remember = false)
     {
index f5d64dab3158d1ddf48dc45377fbe348f90ba6a4..2540fe2d821386e591a668f3b460836678d0f1fa 100644 (file)
@@ -295,8 +295,8 @@ class LdapService
 
         if ($this->config['dump_user_groups']) {
             throw new JsonDebugException([
-                'details_from_ldap'  => $user,
-                'parsed_direct_user_groups' => $userGroups,
+                'details_from_ldap'             => $user,
+                'parsed_direct_user_groups'     => $userGroups,
                 'parsed_recursive_user_groups'  => $allGroups,
             ]);
         }
index c59685ef5daadd422ab7d22252092517a3b3ee1a..03ef926cb07de08cd503b5cb6a0be7e4b8c94677 100644 (file)
@@ -367,7 +367,7 @@ class LdapTest extends TestCase
         $this->mockLdap->shouldReceive('searchAndGetEntries')->times(4)
             ->with($this->resourceId, config('services.ldap.base_dn'), \Mockery::type('string'), \Mockery::type('array'))
             ->andReturn($userResp, ['count' => 1,
-                0 => [
+                0                           => [
                     'dn'       => 'dc=test,' . config('services.ldap.base_dn'),
                     'memberof' => [
                         'count' => 1,
@@ -376,13 +376,13 @@ class LdapTest extends TestCase
                 ],
             ], [
                 'count' => 1,
-                0 => [
-                    'dn' => 'cn=ldaptester,ou=groups,dc=example,dc=com',
+                0       => [
+                    'dn'       => 'cn=ldaptester,ou=groups,dc=example,dc=com',
                     'memberof' => [
                         'count' => 1,
                         0       => 'cn=monsters,ou=groups,dc=example,dc=com',
                     ],
-                ]
+                ],
             ], ['count' => 0]);
 
         $resp = $this->mockUserLogin();
@@ -390,9 +390,9 @@ class LdapTest extends TestCase
             'details_from_ldap' => [
                 'dn'       => 'dc=test,' . config('services.ldap.base_dn'),
                 'memberof' => [
-                    0 => 'cn=ldaptester,ou=groups,dc=example,dc=com',
+                    0       => 'cn=ldaptester,ou=groups,dc=example,dc=com',
                     'count' => 1,
-                ]
+                ],
             ],
             'parsed_direct_user_groups' => [
                 'ldaptester',