From 22e98c77b41a787ff8c391d3235c649fe489e908 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Fri, 11 May 2018 12:44:49 +0200
Subject: [PATCH] Fix indentation

---
 dictionaries/login.definition.json            |  6 +-
 modules/core/lib/Auth/UserPassOrgBase.php     | 32 +++++-----
 modules/core/www/loginuserpassorg.php         |  2 +-
 .../core/lib/Auth/UserPassOrgBaseTest.php     | 62 +++++++++----------
 4 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/dictionaries/login.definition.json b/dictionaries/login.definition.json
index 15969601b..29ff2249d 100644
--- a/dictionaries/login.definition.json
+++ b/dictionaries/login.definition.json
@@ -62,9 +62,9 @@
 	"remember_username": {
 		"en": "Remember my username"
 	},
-    "remember_me": {
-        "en": "Remember me"
-    },
+	"remember_me": {
+		"en": "Remember me"
+	},
 	"remember_organization": {
 		"en": "Remember my organization"
 	}
diff --git a/modules/core/lib/Auth/UserPassOrgBase.php b/modules/core/lib/Auth/UserPassOrgBase.php
index ad15f86b3..ffe063475 100644
--- a/modules/core/lib/Auth/UserPassOrgBase.php
+++ b/modules/core/lib/Auth/UserPassOrgBase.php
@@ -57,12 +57,12 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 	 */
 	protected $rememberUsernameChecked = FALSE;
 
-    /**
-     * Storage for authsource config option remember.organization.enabled
-     * loginuserpassorg.php page/template use this option to present users
-     * with a checkbox to save their organization choice for the next login request.
-     * @var bool
-     */
+	/**
+	 * Storage for authsource config option remember.organization.enabled
+	 * loginuserpassorg.php page/template use this option to present users	
+	 * with a checkbox to save their organization choice for the next login request.
+	 * @var bool
+ 	*/
 	protected $rememberOrganizationEnabled = false;
 
 	/**
@@ -99,10 +99,10 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 			$this->rememberUsernameChecked = (bool) $config['remember.username.checked'];
 			unset($config['remember.username.checked']);
 		}
-        // Get the remember organization config options
-        if (isset($config['remember.organization.enabled'])) {
-            $this->rememberOrganizationEnabled = (bool) $config['remember.organization.enabled'];
-            unset($config['remember.organization.enabled']);
+		// Get the remember organization config options
+		if (isset($config['remember.organization.enabled'])) {
+			$this->rememberOrganizationEnabled = (bool) $config['remember.organization.enabled'];
+			unset($config['remember.organization.enabled']);
 		}
 		if (isset($config['remember.organization.checked'])) {
 			$this->rememberOrganizationChecked = (bool) $config['remember.organization.checked'];
@@ -159,16 +159,16 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 	 * @return bool
 	 */
 	public function getRememberUsernameChecked()
-    {
+	{
 		return $this->rememberUsernameChecked;
 	}
 
-    /**
-     * Getter for the authsource config option remember.organization.enabled
-     * @return bool
-     */
+	/**
+	 * Getter for the authsource config option remember.organization.enabled
+	 * @return bool
+	 */
 	public function getRememberOrganizationEnabled()
-    {
+	{
 		return $this->rememberOrganizationEnabled;
 	}
 
diff --git a/modules/core/www/loginuserpassorg.php b/modules/core/www/loginuserpassorg.php
index 20cbe0b12..2407f903c 100644
--- a/modules/core/www/loginuserpassorg.php
+++ b/modules/core/www/loginuserpassorg.php
@@ -59,7 +59,7 @@ if ($organizations === NULL || !empty($organization)) {
 			$params = $sessionHandler->getCookieParams();
 			$params['expire'] = time();
 			$params['expire'] += (isset($_REQUEST['remember_username']) && $_REQUEST['remember_username'] == 'Yes' ? 31536000 : -300);
-            \SimpleSAML\Utils\HTTP::setCookie($source->getAuthId() . '-username', $username, $params, FALSE);
+			\SimpleSAML\Utils\HTTP::setCookie($source->getAuthId() . '-username', $username, $params, false);
 		}
 
         if ($source->getRememberOrganizationEnabled()) {
diff --git a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
index e8fd9bb43..9b2fdea58 100644
--- a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
+++ b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
@@ -1,41 +1,41 @@
 <?php
-    /**
-     * Created by PhpStorm.
-     * User: agustin
-     * Date: 16.10.2017
-     * Time: 12:17
-     */
+/**
+ * Created by PhpStorm.
+ * User: agustin
+ * Date: 16.10.2017
+ * Time: 12:17
+ */
 
-    namespace SimpleSAML\Test\Module\core\Auth;
+namespace SimpleSAML\Test\Module\core\Auth;
 
-    use SimpleSAML\Module\core\Auth\UserPassOrgBase;
+use SimpleSAML\Module\core\Auth\UserPassOrgBase;
 
-    class UserPassOrgBaseTest extends \PHPUnit_Framework_TestCase
+class UserPassOrgBaseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testRememberOrganizationEnabled()
     {
-        public function testRememberOrganizationEnabled()
-        {
-            $config = array(
-                'ldap:LDAPMulti',
+        $config = array(
+            'ldap:LDAPMulti',
 
-                'remember.organization.enabled' => true,
-                'remember.organization.checked' => false,
+            'remember.organization.enabled' => true,
+            'remember.organization.checked' => false,
 
-                'my-org' => array(
-                    'description' => 'My organization',
-                    // The rest of the options are the same as those available for
-                    // the LDAP authentication source.
-                    'hostname' => 'ldap://ldap.myorg.com',
-                    'dnpattern' => 'uid=%username%,ou=employees,dc=example,dc=org',
-                    // Whether SSL/TLS should be used when contacting the LDAP server.
-                    'enable_tls' => false,
-                )
-            );
+            'my-org' => array(
+                'description' => 'My organization',
+                // The rest of the options are the same as those available for
+                // the LDAP authentication source.
+                'hostname' => 'ldap://ldap.myorg.com',
+                'dnpattern' => 'uid=%username%,ou=employees,dc=example,dc=org',
+                // Whether SSL/TLS should be used when contacting the LDAP server.
+                'enable_tls' => false,
+            )
+        );
 
-            $mockUserPassOrgBase = $this->getMockBuilder('\sspmod_core_Auth_UserPassOrgBase')
-                ->setConstructorArgs(array(array('AuthId' => 'my-org'), &$config))
-                ->setMethods(array())
-                ->getMockForAbstractClass();
+        $mockUserPassOrgBase = $this->getMockBuilder('\sspmod_core_Auth_UserPassOrgBase')
+            ->setConstructorArgs(array(array('AuthId' => 'my-org'), &$config))
+            ->setMethods(array())
+            ->getMockForAbstractClass();
 
-            $this->assertTrue($mockUserPassOrgBase->getRememberOrganizationEnabled());
-        }
+        $this->assertTrue($mockUserPassOrgBase->getRememberOrganizationEnabled());
     }
+}
-- 
GitLab