Browse Source

Fix indentation for the locale option in Hash::sort

Alexandros Solanos 9 years ago
parent
commit
ce90e5e6b3
2 changed files with 9 additions and 9 deletions
  1. 3 3
      src/Utility/Hash.php
  2. 6 6
      tests/TestCase/Utility/HashTest.php

+ 3 - 3
src/Utility/Hash.php

@@ -999,9 +999,9 @@ class Hash
             $type = SORT_STRING;
         } elseif ($type === 'natural') {
             $type = SORT_NATURAL;
-	} elseif ($type === 'locale') {
-	    $type = SORT_LOCALE_STRING;
-	} else {
+        } elseif ($type === 'locale') {
+            $type = SORT_LOCALE_STRING;
+        } else {
             $type = SORT_REGULAR;
         }
         if ($ignoreCase) {

+ 6 - 6
tests/TestCase/Utility/HashTest.php

@@ -1684,11 +1684,11 @@ class HashTest extends TestCase
      */
     public function testSortLocale()
     {
-	// get the current locale
-	$oldLocale = setlocale(LC_COLLATE, '0');
+        // get the current locale
+        $oldLocale = setlocale(LC_COLLATE, '0');
 
-	// the de_DE.utf8 locale must be installed on the system where the test is performed
-	setlocale(LC_COLLATE, 'de_DE.utf8');
+        // the de_DE.utf8 locale must be installed on the system where the test is performed
+        setlocale(LC_COLLATE, 'de_DE.utf8');
 
         $items = [
             ['Item' => ['entry' => 'Übergabe']],
@@ -1706,8 +1706,8 @@ class HashTest extends TestCase
         ];
         $this->assertEquals($expected, $result);
 
-	// change to the original locale
-	setlocale(LC_COLLATE, $oldLocale);
+        // change to the original locale
+        setlocale(LC_COLLATE, $oldLocale);
     }
 
     /**