Browse Source

whitespace issues

euromark 13 years ago
parent
commit
f59c1d5ef1
100 changed files with 155 additions and 174 deletions
  1. 0 2
      Console/Command/CcShell.php
  2. 1 1
      Console/Command/CodeShell.php
  3. 0 1
      Console/Command/HashShell.php
  4. 0 2
      Console/Command/IndentShell.php
  5. 1 1
      Console/Command/IndexShell.php
  6. 0 1
      Console/Command/PhpTagShell.php
  7. 0 1
      Console/Command/PwdShell.php
  8. 0 1
      Console/Command/UserShell.php
  9. 75 38
      Console/Command/WhitespaceShell.php
  10. 1 1
      Controller/Component/Auth/TinyAuthorize.php
  11. 1 1
      Controller/Component/AutoLoginComponent.php
  12. 0 1
      Controller/Component/CommonComponent.php
  13. 0 1
      Controller/QloginController.php
  14. 0 1
      Controller/TinyUrlsController.php
  15. 0 2
      Lib/Auth.php
  16. 1 1
      Lib/CaptchaLib.php
  17. 1 1
      Lib/CurlLib.php
  18. 1 1
      Lib/Error/MyErrorHandler.php
  19. 0 1
      Lib/GeocodeLib.php
  20. 0 2
      Lib/HazardLib.php
  21. 1 1
      Lib/HttpSocketLib.php
  22. 0 2
      Lib/IcalLib.php
  23. 1 1
      Lib/ImapLib.php
  24. 0 2
      Lib/RandomLib.php
  25. 1 1
      Lib/Routing/UrlCacheManager.php
  26. 1 1
      Lib/SpellLib.php
  27. 0 2
      Lib/UserAgentLib.php
  28. 0 1
      Lib/Utility/ChmodLib.php
  29. 0 2
      Lib/Utility/NumberLib.php
  30. 0 2
      Lib/Utility/TextLib.php
  31. 0 2
      Lib/Utility/TimeLib.php
  32. 1 1
      Model/Behavior/BitmaskedBehavior.php
  33. 0 2
      Model/Behavior/CaptchaBehavior.php
  34. 1 1
      Model/Behavior/ChangePasswordBehavior.php
  35. 1 1
      Model/Behavior/ConfirmableBehavior.php
  36. 1 1
      Model/Behavior/CustomFindsBehavior.php
  37. 1 1
      Model/Behavior/DecimalInputBehavior.php
  38. 1 1
      Model/Behavior/LinkableBehavior.php
  39. 0 1
      Model/Behavior/MasterPasswordBehavior.php
  40. 23 23
      Model/Behavior/NumberFormatBehavior.php
  41. 1 1
      Model/Behavior/PasswordableBehavior.php
  42. 1 1
      Model/Behavior/SluggedBehavior.php
  43. 0 1
      Model/CodeKey.php
  44. 0 1
      Model/Log.php
  45. 0 1
      Model/Token.php
  46. 1 1
      Test/Case/Controller/Component/CalendarComponentTest.php
  47. 0 2
      Test/Case/Controller/Component/CommonComponentTest.php
  48. 0 1
      Test/Case/Lib/AuthTest.php
  49. 1 1
      Test/Case/Lib/EmailLibTest.php
  50. 1 1
      Test/Case/Lib/GeocodeLibTest.php
  51. 1 1
      Test/Case/Lib/GooglLibTest.php
  52. 0 1
      Test/Case/Lib/HazardLibTest.php
  53. 0 1
      Test/Case/Lib/IcalLibTest.php
  54. 1 1
      Test/Case/Lib/ImapLibTest.php
  55. 0 1
      Test/Case/Lib/RandomLibTest.php
  56. 1 1
      Test/Case/Lib/SpellLibTest.php
  57. 0 1
      Test/Case/Lib/Utility/ChmodLibTest.php
  58. 1 1
      Test/Case/Lib/Utility/NumberLibTest.php
  59. 0 1
      Test/Case/Lib/Utility/TextLibTest.php
  60. 1 1
      Test/Case/Lib/Utility/TimeLibTest.php
  61. 1 1
      Test/Case/Model/Behavior/BitmaskedBehaviorTest.php
  62. 0 2
      Test/Case/Model/Behavior/CaptchaBehaviorTest.php
  63. 1 1
      Test/Case/Model/Behavior/ConfirmableBehaviorTest.php
  64. 1 1
      Test/Case/Model/Behavior/CustomFindsBehaviorTest.php
  65. 0 2
      Test/Case/Model/Behavior/GeocoderBehaviorTest.php
  66. 1 1
      Test/Case/Model/Behavior/KeyValueBehaviorTest.php
  67. 1 1
      Test/Case/Model/Behavior/MasterPasswordBehaviorTest.php
  68. 0 2
      Test/Case/Model/Behavior/PasswordableBehaviorTest.php
  69. 1 1
      Test/Case/Model/Behavior/SluggedBehaviorTest.php
  70. 0 1
      Test/Case/Model/ContactFormTest.php
  71. 0 2
      Test/Case/Model/KeyValueTest.php
  72. 1 1
      Test/Case/Model/MyModelTest.php
  73. 0 1
      Test/Case/View/Helper/CommonHelperTest.php
  74. 1 1
      Test/Case/View/Helper/FlattrHelperTest.php
  75. 1 1
      Test/Case/View/Helper/FormExtHelperTest.php
  76. 1 1
      Test/Case/View/Helper/FormatHelperTest.php
  77. 1 1
      Test/Case/View/Helper/GoogleMapV3HelperTest.php
  78. 1 1
      Test/Case/View/Helper/IcalHelperTest.php
  79. 1 1
      Test/Case/View/Helper/MyHelperTest.php
  80. 0 1
      Test/Case/View/Helper/NumericHelperTest.php
  81. 0 1
      Test/Case/View/Helper/QrCodeHelperTest.php
  82. 1 1
      Test/Case/View/Helper/TextExtHelperTest.php
  83. 1 1
      Test/Fixture/AddressFixture.php
  84. 1 1
      Test/Fixture/BlogPostsTagFixture.php
  85. 1 1
      Test/Fixture/CityFixture.php
  86. 1 1
      Test/Fixture/CodeKeyFixture.php
  87. 1 1
      Test/Fixture/CountryFixture.php
  88. 1 1
      Test/Fixture/CountryProvinceFixture.php
  89. 1 1
      Test/Fixture/CountyFixture.php
  90. 1 1
      Test/Fixture/CurrencyFixture.php
  91. 1 1
      Test/Fixture/DiscountCodeFixture.php
  92. 1 1
      Test/Fixture/DiscountFixture.php
  93. 0 1
      Test/Fixture/ExifFixture.php
  94. 1 1
      Test/Fixture/ImageFixture.php
  95. 1 1
      Test/Fixture/LanguageFixture.php
  96. 1 1
      Test/Fixture/LocationFixture.php
  97. 1 1
      Test/Fixture/LogFixture.php
  98. 1 1
      Test/Fixture/LogIpFixture.php
  99. 1 1
      Test/Fixture/MessageFixture.php
  100. 0 0
      Test/Fixture/PaymentMethodFixture.php

+ 0 - 2
Console/Command/CcShell.php

@@ -327,5 +327,3 @@ class CcShell extends AppShell {
 	}
 
 }
-
-

+ 1 - 1
Console/Command/CodeShell.php

@@ -183,7 +183,7 @@ class CodeShell extends AppShell {
 	 * 2012-01-06 ms
 	 */
 	public function utf8() {
-		$this->_paths = array(APP.'View'.DS);
+		$this->_paths = array(APP . 'View' . DS);
 		$this->params['ext'] = 'php|ctp';
 		//$this->out('found: '.count($this->_files));
 

+ 0 - 1
Console/Command/HashShell.php

@@ -147,4 +147,3 @@ class HashShell extends AppShell {
 	}
 
 }
-

+ 0 - 2
Console/Command/IndentShell.php

@@ -330,5 +330,3 @@ class IndentShell extends AppShell {
 		}
 	}
 }
-
-

+ 1 - 1
Console/Command/IndexShell.php

@@ -301,4 +301,4 @@ class IndexShell extends AppShell {
 			));
 	}
 
-}
+}

+ 0 - 1
Console/Command/PhpTagShell.php

@@ -110,4 +110,3 @@ class PhpTagShell extends AppShell {
 	}
 
 }
-

+ 0 - 1
Console/Command/PwdShell.php

@@ -51,4 +51,3 @@ class PwdShell extends AppShell {
 		$this->out('---- using the salt of the core.php (!)');
 	}
 }
-

+ 0 - 1
Console/Command/UserShell.php

@@ -125,4 +125,3 @@ class UserShell extends AppShell {
 	}
 
 }
-

+ 75 - 38
Console/Command/WhitespaceShell.php

@@ -6,17 +6,17 @@ class WhitespaceShell extends AppShell {
 
 	public $autoCorrectAll = false;
 	# each report: [0] => found, [1] => corrected
-	public $report = array('leading'=>array(0, 0),'trailing'=>array(0, 0));
+	public $report = array('leading'=>array(0, 0), 'trailing'=>array(0, 0));
 
 	public function main() {
 		$App = new Folder(APP);
 
-		$r = $App->findRecursive('.*\.php');
+		$files = $App->findRecursive('.*\.php');
 		$this->out("Checking *.php in ".APP);
 
 		$folders = array();
 
-		foreach ($r as $file) {
+		foreach ($files as $file) {
 			$error = '';
 			$action = '';
 
@@ -28,50 +28,51 @@ class WhitespaceShell extends AppShell {
 				$error = 'trailing';
 			}
 
-			if (!empty($error)) {
-				$this->report[$error][0]++;
-				$this->out('');
-				$this->out('contains '.$error.' whitespaces: '.$this->shortPath($file));
-
-				if (!$this->autoCorrectAll) {
-					$dirname = dirname($file);
+			if (empty($error)) {
+				continue;
+			}
+			$this->report[$error][0]++;
+			$this->out('');
+			$this->out('contains '.$error.' whitespaces: '.$this->shortPath($file));
 
-					if (in_array($dirname, $folders)) {
-						$action = 'y';
-					}
+			if (!$this->autoCorrectAll) {
+				$dirname = dirname($file);
 
-					while (empty($action)) {
-						//TODO: [r]!
-						$action = $this->in(__('Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y','n','r','a','q','*'), 'q');
-					}
-				} else {
+				if (in_array($dirname, $folders)) {
 					$action = 'y';
 				}
 
-				if ($action == '*') {
-					$action = 'y';
-					$this->autoCorrectAll = true;
-
-				} elseif ($action == 'a') {
-					$action = 'y';
-					$folders[] = $dirname;
-					$this->out('All: '.$dirname);
+				while (empty($action)) {
+					//TODO: [r]!
+					$action = $this->in(__('Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y','n','r','a','q','*'), 'q');
 				}
+			} else {
+				$action = 'y';
+			}
 
-				if ($action == 'q') {
-					die('Abort... Done');
+			if ($action == '*') {
+				$action = 'y';
+				$this->autoCorrectAll = true;
 
-				} elseif ($action == 'y') {
-					if ($error == 'leading') {
-						$res = preg_replace('/^[\n\r|\n\r|\n|\r|\s]+\<\?php/', '<?php', $c);
-					} else { //trailing
-						$res = preg_replace('/\?\>[\n\r|\n\r|\n|\r|\s]+$/', '?>', $c);
-					}
+			} elseif ($action == 'a') {
+				$action = 'y';
+				$folders[] = $dirname;
+				$this->out('All: '.$dirname);
+			}
+
+			if ($action == 'q') {
+				die('Abort... Done');
 
-					file_put_contents($file, $res);
-					$this->report[$error][1]++;
-					$this->out('fixed '.$error.' whitespaces: '.$this->shortPath($file));
+			} elseif ($action == 'y') {
+				if ($error == 'leading') {
+					$res = preg_replace('/^[\n\r|\n\r|\n|\r|\s]+\<\?php/', '<?php', $c);
+				} else { //trailing
+					$res = preg_replace('/\?\>[\n\r|\n\r|\n|\r|\s]+$/', '?>', $c);
 				}
+
+				file_put_contents($file, $res);
+				$this->report[$error][1]++;
+				$this->out('fixed '.$error.' whitespaces: '.$this->shortPath($file));
 			}
 		}
 
@@ -81,5 +82,41 @@ class WhitespaceShell extends AppShell {
 		$this->out('fixed '.$this->report['leading'][1].' leading, '.$this->report['trailing'][1].' trailing ws');
 	}
 
-}
+	public function whitespaces() {
+		if (!empty($this->args[0])) {
+			$folder = realpath($this->args[0]);
+		} else {
+			$folder = APP;
+		}
+		$App = new Folder($folder);
+		$this->out("Checking *.php in ".APP);
 
+		$files = $App->findRecursive('.*\.php');
+
+		$this->out('Found '. count($files) . ' files.');
+
+		$action = $this->in(__('Continue? [y]/[n]'), array('y', 'n'), 'n');
+		if ($action === 'n') {
+			$this->error('Aborted');
+		}
+
+		foreach ($files as $file) {
+			$content = $store = file_get_contents($file);
+
+			$newline = PHP_EOL;
+			$x = substr_count($content, "\r\n");
+			if ($x > 0) {
+				$newline = "\r\n";
+			} else {
+				$newline = "\n";
+			}
+
+			# add one new line at the end
+			$content = trim($content) . $newline;
+			if ($content !== $store) {
+				file_put_contents($file, $content);
+			}
+		}
+	}
+
+}

+ 1 - 1
Controller/Component/Auth/TinyAuthorize.php

@@ -213,4 +213,4 @@ class TinyAuthorize extends BaseAuthorize {
 		return $res;
 	}
 
-}
+}

+ 1 - 1
Controller/Component/AutoLoginComponent.php

@@ -324,4 +324,4 @@ class AutoLoginComponent extends Component {
 		return $cookie;
 	}
 
-}
+}

+ 0 - 1
Controller/Component/CommonComponent.php

@@ -1574,4 +1574,3 @@ class CommonComponent extends Component {
 
 
 }
-

+ 0 - 1
Controller/QloginController.php

@@ -114,4 +114,3 @@ class QloginController extends ToolsAppController {
 	}
 
 }
-

+ 0 - 1
Controller/TinyUrlsController.php

@@ -90,4 +90,3 @@ class TinyUrlsController extends ToolsAppController {
 	}
 
 }
-

+ 0 - 2
Lib/Auth.php

@@ -139,5 +139,3 @@ class Auth {
 	}
 
 }
-
-

+ 1 - 1
Lib/CaptchaLib.php

@@ -48,4 +48,4 @@ class CaptchaLib {
 		return Security::hash($hashValue, isset($options['hashType']) ? $options['hashType'] : null, $options['salt']);
 	}
 
-}
+}

+ 1 - 1
Lib/CurlLib.php

@@ -266,4 +266,4 @@ class CurlLib {
 		curl_close($this->Ch);
 	}
 
-}
+}

+ 1 - 1
Lib/Error/MyErrorHandler.php

@@ -149,4 +149,4 @@ class MyErrorHandler extends ErrorHandler {
 		return implode(' - ', $data);
 	}
 
-}
+}

+ 0 - 1
Lib/GeocodeLib.php

@@ -1043,4 +1043,3 @@ Array
 }
 
 */
-

+ 0 - 2
Lib/HazardLib.php

@@ -102,5 +102,3 @@ class HazardLib {
 	}
 
 }
-
-

+ 1 - 1
Lib/HttpSocketLib.php

@@ -133,4 +133,4 @@ class HttpSocketLib {
 	}
 
 
-}
+}

+ 0 - 2
Lib/IcalLib.php

@@ -144,5 +144,3 @@ class IcalLib {
 
 
 }
-
-

+ 1 - 1
Lib/ImapLib.php

@@ -799,4 +799,4 @@ class ImapFolderLib {
 
 class ImapException extends CakeException {
 
-}
+}

+ 0 - 2
Lib/RandomLib.php

@@ -340,5 +340,3 @@ class RandomLib {
 	}
 
 }
-
-

+ 1 - 1
Lib/Routing/UrlCacheManager.php

@@ -155,4 +155,4 @@ class UrlCacheManager {
 		}
 	}
 
-}
+}

+ 1 - 1
Lib/SpellLib.php

@@ -88,4 +88,4 @@ class SpellLib {
 		enchant_broker_free($this->_Broker);
 	}
 
-}
+}

+ 0 - 2
Lib/UserAgentLib.php

@@ -164,5 +164,3 @@ class UserAgentLib extends CakeRequest {
 	}
 
 }
-
-

+ 0 - 1
Lib/Utility/ChmodLib.php

@@ -127,4 +127,3 @@ class ChmodLib {
 	}
 
 }
-

+ 0 - 2
Lib/Utility/NumberLib.php

@@ -294,5 +294,3 @@ class NumberLib extends CakeNumber {
 	}
 
 }
-
-

+ 0 - 2
Lib/Utility/TextLib.php

@@ -660,5 +660,3 @@ $this -> error[$arrays][] = $r[0] . $this -> error_max_time_char;
 }
 
 */
-
-

+ 0 - 2
Lib/Utility/TimeLib.php

@@ -1308,5 +1308,3 @@ class TimeLib extends CakeTime {
 	}
 
 }
-
-

+ 1 - 1
Model/Behavior/BitmaskedBehavior.php

@@ -231,4 +231,4 @@ class BitmaskedBehavior extends ModelBehavior {
 		return array('('.$Model->alias.'.'.$field.' & ? != ?)' => array($bitmask, $bitmask));
 	}
 
-}
+}

+ 0 - 2
Model/Behavior/CaptchaBehavior.php

@@ -228,5 +228,3 @@ class CaptchaBehavior extends ModelBehavior {
 	}
 
 }
-
-

+ 1 - 1
Model/Behavior/ChangePasswordBehavior.php

@@ -295,4 +295,4 @@ class ChangePasswordBehavior extends ModelBehavior {
 	}
 
 
-}
+}

+ 1 - 1
Model/Behavior/ConfirmableBehavior.php

@@ -83,4 +83,4 @@ class ConfirmableBehavior extends ModelBehavior {
 		return $return;
 	}
 
-}
+}

+ 1 - 1
Model/Behavior/CustomFindsBehavior.php

@@ -110,4 +110,4 @@ class CustomFindsBehavior extends ModelBehavior {
 	}
 
 
-}
+}

+ 1 - 1
Model/Behavior/DecimalInputBehavior.php

@@ -219,4 +219,4 @@ class DecimalInputBehavior extends ModelBehavior {
 		}
 	}
 
-}
+}

+ 1 - 1
Model/Behavior/LinkableBehavior.php

@@ -205,4 +205,4 @@ class LinkableBehavior extends ModelBehavior {
 		return $query;
 	}
 
-}
+}

+ 0 - 1
Model/Behavior/MasterPasswordBehavior.php

@@ -145,4 +145,3 @@ class MasterPasswordBehavior extends ModelBehavior {
 	}
 
 }
-

+ 23 - 23
Model/Behavior/NumberFormatBehavior.php

@@ -62,12 +62,12 @@ class NumberFormatBehavior extends ModelBehavior {
 	* leave fields empty to auto-detect all float inputs
 	*/
 	public function setup(Model $Model, $config = array()) {
-		$this->config[$Model->alias] = $this->_defaults;
+		$this->settings[$Model->alias] = $this->_defaults;
 
 		if (!empty($config['strict'])) {
-			$this->config[$Model->alias]['transform']['.'] = '#';
+			$this->settings[$Model->alias]['transform']['.'] = '#';
 		}
-		if ($this->config[$Model->alias]['localeconv'] || !empty($config['localeconv'])) {
+		if ($this->settings[$Model->alias]['localeconv'] || !empty($config['localeconv'])) {
 			# use locale settings
 			$conv = localeconv();
 			$loc = array(
@@ -79,27 +79,27 @@ class NumberFormatBehavior extends ModelBehavior {
 			$loc = (array)$configure;
 		}
 		if (!empty($loc)) {
-			$this->config[$Model->alias]['transform'] = array(
-				$loc['thousands'] => $this->config[$Model->alias]['transform']['.'],
-				$loc['decimals'] => $this->config[$Model->alias]['transform'][','],
+			$this->settings[$Model->alias]['transform'] = array(
+				$loc['thousands'] => $this->settings[$Model->alias]['transform']['.'],
+				$loc['decimals'] => $this->settings[$Model->alias]['transform'][','],
 			);
 		}
-		//debug($this->config[$Model->alias]);
+		//debug($this->settings[$Model->alias]);
 
-		$this->config[$Model->alias] = array_merge($this->config[$Model->alias], $config);
+		$this->settings[$Model->alias] = array_merge($this->settings[$Model->alias], $config);
 
 		$numberFields = array();
 		$schema = $Model->schema();
 		foreach ($schema as $key => $values) {
-			if (isset($values['type']) && !in_array($key, $this->config[$Model->alias]['fields']) && in_array($values['type'], $this->config[$Model->alias]['observedTypes'])) {
+			if (isset($values['type']) && !in_array($key, $this->settings[$Model->alias]['fields']) && in_array($values['type'], $this->settings[$Model->alias]['observedTypes'])) {
 				array_push($numberFields, $key);
 			}
 		}
-		$this->config[$Model->alias]['fields'] = array_merge($this->config[$Model->alias]['fields'], $numberFields);
+		$this->settings[$Model->alias]['fields'] = array_merge($this->settings[$Model->alias]['fields'], $numberFields);
 	}
 
 	public function beforeValidate(Model $Model) {
-		if ($this->config[$Model->alias]['before'] != 'validate') {
+		if ($this->settings[$Model->alias]['before'] != 'validate') {
 			return true;
 		}
 
@@ -108,7 +108,7 @@ class NumberFormatBehavior extends ModelBehavior {
 	}
 
 	public function beforeSave(Model $Model) {
-		if ($this->config[$Model->alias]['before'] != 'save') {
+		if ($this->settings[$Model->alias]['before'] != 'save') {
 			return true;
 		}
 
@@ -117,7 +117,7 @@ class NumberFormatBehavior extends ModelBehavior {
 	}
 
 	public function afterFind(Model $Model, $results, $primary) {
-		if (!$this->config[$Model->alias]['output'] || empty($results)) {
+		if (!$this->settings[$Model->alias]['output'] || empty($results)) {
 			return $results;
 		}
 
@@ -131,7 +131,7 @@ class NumberFormatBehavior extends ModelBehavior {
 	 */
 	public function prepInput(Model $Model, &$data) {
 		foreach ($data[$Model->alias] as $key => $field) {
-			if (in_array($key, $this->config[$Model->alias]['fields'])) {
+			if (in_array($key, $this->settings[$Model->alias]['fields'])) {
 				$data[$Model->alias][$key] = $this->formatInputOutput($Model, $field, 'in');
 			}
 		}
@@ -147,7 +147,7 @@ class NumberFormatBehavior extends ModelBehavior {
 				return $data;
 			}
 			foreach ($record[$Model->alias] as $key => $value) {
-				if (in_array($key, $this->config[$Model->alias]['fields'])) {
+				if (in_array($key, $this->settings[$Model->alias]['fields'])) {
 					$data[$datakey][$Model->alias][$key] = $this->formatInputOutput($Model, $value, 'out');
 				}
 			}
@@ -162,8 +162,8 @@ class NumberFormatBehavior extends ModelBehavior {
 	public function formatInputOutput(Model $Model, $value, $dir = 'in') {
 		$this->_setTransformations($Model, $dir);
 		if ($dir === 'out') {
-			if ($this->config[$Model->alias]['multiply']) {
-				$value *= (float)(1 / $this->config[$Model->alias]['multiply']);
+			if ($this->settings[$Model->alias]['multiply']) {
+				$value *= (float)(1 / $this->settings[$Model->alias]['multiply']);
 			}
 
 			$value = str_replace($this->delimiterFromFormat, $this->delimiterBaseFormat, (String)$value);
@@ -173,8 +173,8 @@ class NumberFormatBehavior extends ModelBehavior {
 			if (is_numeric($value)) {
 				$value = (float)$value;
 
-				if ($this->config[$Model->alias]['multiply']) {
-					$value *= $this->config[$Model->alias]['multiply'];
+				if ($this->settings[$Model->alias]['multiply']) {
+					$value *= $this->settings[$Model->alias]['multiply'];
 				}
 			}
 		}
@@ -188,9 +188,9 @@ class NumberFormatBehavior extends ModelBehavior {
 	protected function _setTransformations(Model $Model, $dir) {
 		$from = array();
 		$base = array();
-		$transform = $this->config[$Model->alias]['transform'];
-		if (!empty($this->config[$Model->alias]['transformReverse'])) {
-			$transform = $this->config[$Model->alias]['transformReverse'];
+		$transform = $this->settings[$Model->alias]['transform'];
+		if (!empty($this->settings[$Model->alias]['transformReverse'])) {
+			$transform = $this->settings[$Model->alias]['transformReverse'];
 		} else {
 			if ($dir === 'out') {
 				$transform = array_reverse($transform, true);
@@ -219,4 +219,4 @@ class NumberFormatBehavior extends ModelBehavior {
 		}
 	}
 
-}
+}

+ 1 - 1
Model/Behavior/PasswordableBehavior.php

@@ -337,4 +337,4 @@ class PasswordableBehavior extends ModelBehavior {
 		return true;
 	}
 
-}
+}

+ 1 - 1
Model/Behavior/SluggedBehavior.php

@@ -654,4 +654,4 @@ class SluggedBehavior extends ModelBehavior {
 		}
 		return false;
 	}
-}
+}

+ 0 - 1
Model/CodeKey.php

@@ -14,4 +14,3 @@ class CodeKey extends Token {
 	public $order = array('CodeKey.created' => 'DESC');
 
 }
-

+ 0 - 1
Model/Log.php

@@ -23,4 +23,3 @@ class Log extends ToolsAppModel {
 	);
 
 }
-

+ 0 - 1
Model/Token.php

@@ -226,4 +226,3 @@ class Token extends ToolsAppModel {
 	}
 
 }
-

+ 1 - 1
Test/Case/Controller/Component/CalendarComponentTest.php

@@ -21,4 +21,4 @@ class CalendarComponentTest extends MyCakeTestCase {
 		//TODO
 	}
 
-}
+}

+ 0 - 2
Test/Case/Controller/Component/CommonComponentTest.php

@@ -237,5 +237,3 @@ class TestLib {
 		}
 	}
 }
-
-

+ 0 - 1
Test/Case/Lib/AuthTest.php

@@ -87,4 +87,3 @@ class AuthTest extends MyCakeTestCase {
 
 
 }
-

+ 1 - 1
Test/Case/Lib/EmailLibTest.php

@@ -263,4 +263,4 @@ class TestEmailLib extends EmailLib {
 		return $this->_encode($text);
 	}
 
-}
+}

+ 1 - 1
Test/Case/Lib/GeocodeLibTest.php

@@ -261,4 +261,4 @@ class GeocodeLibTest extends MyCakeTestCase {
 
 	}
 
-}
+}

+ 1 - 1
Test/Case/Lib/GooglLibTest.php

@@ -85,4 +85,4 @@ class GooglLibTest extends CakeTestCase {
 
 	}
 
-}
+}

+ 0 - 1
Test/Case/Lib/HazardLibTest.php

@@ -56,4 +56,3 @@ class HazardLibTest extends CakeTestCase {
 
 
 }
-

+ 0 - 1
Test/Case/Lib/IcalLibTest.php

@@ -73,4 +73,3 @@ class IcalLibTest extends CakeTestCase {
 	}
 
 }
-

+ 1 - 1
Test/Case/Lib/ImapLibTest.php

@@ -143,4 +143,4 @@ class ImapLibTest extends MyCakeTestCase {
 		return $messages;
 	}
 
-}
+}

+ 0 - 1
Test/Case/Lib/RandomLibTest.php

@@ -52,4 +52,3 @@ class RandomLibTest extends CakeTestCase {
 
 
 }
-

+ 1 - 1
Test/Case/Lib/SpellLibTest.php

@@ -96,4 +96,4 @@ class SpellLibTest extends MyCakeTestCase {
 		$this->assertTrue(in_array('Mouse', $suggestions));
 	}
 
-}
+}

+ 0 - 1
Test/Case/Lib/Utility/ChmodLibTest.php

@@ -73,4 +73,3 @@ class ChmodLibTest extends CakeTestCase {
 /** End **/
 
 }
-

+ 1 - 1
Test/Case/Lib/Utility/NumberLibTest.php

@@ -183,4 +183,4 @@ class NumberLibTest extends MyCakeTestCase {
 		}
 	}
 
-}
+}

+ 0 - 1
Test/Case/Lib/Utility/TextLibTest.php

@@ -149,4 +149,3 @@ echo "Beautified Text:\n".	$text->beautify(80);	//beautify the text, wordwrap=80
 */
 
 }
-

+ 1 - 1
Test/Case/Lib/Utility/TimeLibTest.php

@@ -568,4 +568,4 @@ class TimeLibTest extends MyCakeTestCase {
 		$this->assertEquals($is, '9:30');
 	}
 
-}
+}

+ 1 - 1
Test/Case/Model/Behavior/BitmaskedBehaviorTest.php

@@ -179,4 +179,4 @@ class BitmaskedComment extends CakeTestModel {
 	const STATUS_PUBLISHED = 2;
 	const STATUS_APPROVED = 4;
 	const STATUS_FLAGGED = 8;
-}
+}

+ 0 - 2
Test/Case/Model/Behavior/CaptchaBehaviorTest.php

@@ -81,5 +81,3 @@ class CaptchaBehaviorTest extends MyCakeTestCase {
 	//TODO
 
 }
-
-

+ 1 - 1
Test/Case/Model/Behavior/ConfirmableBehaviorTest.php

@@ -18,4 +18,4 @@ class ConfirmableBehaviorTest extends MyCakeTestCase {
 	}
 
 	//TODO
-}
+}

+ 1 - 1
Test/Case/Model/Behavior/CustomFindsBehaviorTest.php

@@ -89,4 +89,4 @@ class CustomFindsBehaviorTest extends MyCakeTestCase {
 		$this->assertSame($queryResult['conditions'], $res['conditions']);
 	}
 
-}
+}

+ 0 - 2
Test/Case/Model/Behavior/GeocoderBehaviorTest.php

@@ -263,5 +263,3 @@ class TestController extends AppController {
 	public $uses = array('Address');
 
 }
-
-

+ 1 - 1
Test/Case/Model/Behavior/KeyValueBehaviorTest.php

@@ -126,4 +126,4 @@ class KeyValueBehaviorTest extends MyCakeTestCase {
 		$this->assertEquals(0, $res);
 	}
 
-}
+}

+ 1 - 1
Test/Case/Model/Behavior/MasterPasswordBehaviorTest.php

@@ -166,4 +166,4 @@ class MasterPasswordBehaviorTest extends MyCakeTestCase {
 class MasterPasswordTestModel extends CakeTestModel {
 	public $useTable = false;
 
-}
+}

+ 0 - 2
Test/Case/Model/Behavior/PasswordableBehaviorTest.php

@@ -324,5 +324,3 @@ class AuthTestComponent {
 	}
 
 }
-
-

+ 1 - 1
Test/Case/Model/Behavior/SluggedBehaviorTest.php

@@ -18270,4 +18270,4 @@ class MessageSlugged extends CakeTestModel {
 		'replace' => false
 	));
 
-}
+}

+ 0 - 1
Test/Case/Model/ContactFormTest.php

@@ -19,4 +19,3 @@ class ContactFormTest extends CakeTestCase {
 
 
 }
-

+ 0 - 2
Test/Case/Model/KeyValueTest.php

@@ -40,5 +40,3 @@ class KeyValueTest extends MyCakeTestCase {
 	}
 
 }
-
-

+ 1 - 1
Test/Case/Model/MyModelTest.php

@@ -599,4 +599,4 @@ class AppTestModel extends MyModel {
 		return array('1'=>'x', '2'=>'y', '3'=>'z');
 	}
 
-}
+}

+ 0 - 1
Test/Case/View/Helper/CommonHelperTest.php

@@ -76,4 +76,3 @@ class CommonHelperTest extends MyCakeTestCase {
 	}
 
 }
-

+ 1 - 1
Test/Case/View/Helper/FlattrHelperTest.php

@@ -37,4 +37,4 @@ class FlattrHelperTest extends MyCakeTestCase {
 		echo $res;
 		$this->assertTrue(!empty($res));
 	}
-}
+}

+ 1 - 1
Test/Case/View/Helper/FormExtHelperTest.php

@@ -22,4 +22,4 @@ class FormExtHelperTest extends MyCakeTestCase {
 		//TODO
 	}
 
-}
+}

+ 1 - 1
Test/Case/View/Helper/FormatHelperTest.php

@@ -265,4 +265,4 @@ class FormatHelperTest extends MyCakeTestCase {
 	public function tearDown() {
 		unset($this->Format);
 	}
-}
+}

+ 1 - 1
Test/Case/View/Helper/GoogleMapV3HelperTest.php

@@ -312,4 +312,4 @@ class GoogleMapV3HelperTest extends MyCakeTestCase {
 
 		echo $this->GoogleMapV3->script();
 	}
-}
+}

+ 1 - 1
Test/Case/View/Helper/IcalHelperTest.php

@@ -67,4 +67,4 @@ class IcalHelperTest extends MyCakeTestCase {
 		ob_flush();
 	}
 
-}
+}

+ 1 - 1
Test/Case/View/Helper/MyHelperTest.php

@@ -18,4 +18,4 @@ class MyHelperTest extends MyCakeTestCase {
 	}
 
 	//TODO
-}
+}

+ 0 - 1
Test/Case/View/Helper/NumericHelperTest.php

@@ -88,4 +88,3 @@ class NumericHelperTest extends MyCakeTestCase {
 		unset($this->Numeric);
 	}
 }
-

+ 0 - 1
Test/Case/View/Helper/QrCodeHelperTest.php

@@ -155,4 +155,3 @@ class QrCodeHelperTest extends MyCakeTestCase {
 		unset($this->QrCode);
 	}
 }
-

+ 1 - 1
Test/Case/View/Helper/TextExtHelperTest.php

@@ -237,4 +237,4 @@ class TextExtHelperTest extends MyCakeTestCase {
 
 	}
 
-}
+}

+ 1 - 1
Test/Fixture/AddressFixture.php

@@ -112,4 +112,4 @@ class AddressFixture extends CakeTestFixture {
 			'type_id' => '0'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/BlogPostsTagFixture.php

@@ -16,4 +16,4 @@ class BlogPostsTagFixture extends CakeTestFixture {
 		array ('id' => 4, 'blog_post_id' => 2, 'tag_id' => 4, 'main' => 0),
 	);
 
-}
+}

+ 1 - 1
Test/Fixture/CityFixture.php

@@ -52,4 +52,4 @@ class CityFixture extends CakeTestFixture {
 			'modified' => '0000-00-00 00:00:00'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/CodeKeyFixture.php

@@ -132,4 +132,4 @@ class CodeKeyFixture extends CakeTestFixture {
 			'modified' => '2011-08-02 18:01:54'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/CountryFixture.php

@@ -231,4 +231,4 @@ class CountryFixture extends CakeTestFixture {
 			'modified' => '2010-06-06 00:19:57'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/CountryProvinceFixture.php

@@ -121,4 +121,4 @@ class CountryProvinceFixture extends CakeTestFixture {
 			'modified' => '2009-11-27 04:10:49'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/CountyFixture.php

@@ -165,4 +165,4 @@ class CountyFixture extends CakeTestFixture {
 			'modified' => '0000-00-00 00:00:00'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/CurrencyFixture.php

@@ -154,4 +154,4 @@ class CurrencyFixture extends CakeTestFixture {
 			'modified' => '2011-07-16 15:12:33'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/DiscountCodeFixture.php

@@ -62,4 +62,4 @@ class DiscountCodeFixture extends CakeTestFixture {
 			'modified' => '2011-11-17 17:30:17'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/DiscountFixture.php

@@ -52,4 +52,4 @@ class DiscountFixture extends CakeTestFixture {
 			'modified' => '2011-11-17 11:56:30'
 		),
 	);
-}
+}

+ 0 - 1
Test/Fixture/ExifFixture.php

@@ -26,4 +26,3 @@ class ExifFixture extends CakeTestFixture {
 		),
 	);
 }
-

+ 1 - 1
Test/Fixture/ImageFixture.php

@@ -143,4 +143,4 @@ class ImageFixture extends CakeTestFixture {
 			'modified' => '2011-07-01 13:57:11'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/LanguageFixture.php

@@ -165,4 +165,4 @@ class LanguageFixture extends CakeTestFixture {
 			'modified' => '2011-07-17 15:23:08'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/LocationFixture.php

@@ -154,4 +154,4 @@ class LocationFixture extends CakeTestFixture {
 			'modified' => '2011-10-22 16:10:04'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/LogFixture.php

@@ -154,4 +154,4 @@ class LogFixture extends CakeTestFixture {
 			'modified' => '2011-09-23 17:14:57'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/LogIpFixture.php

@@ -154,4 +154,4 @@ class LogIpFixture extends CakeTestFixture {
 			'created' => '2011-09-23 10:18:43'
 		),
 	);
-}
+}

+ 1 - 1
Test/Fixture/MessageFixture.php

@@ -66,4 +66,4 @@ class MessageFixture extends CakeTestFixture {
 		array('random' => 6, 'name' => 'Sixth'),
 	);
 
-}
+}

+ 0 - 0
Test/Fixture/PaymentMethodFixture.php


Some files were not shown because too many files changed in this diff