Browse Source

fix whitespace coding standard errors

euromark 12 years ago
parent
commit
3cf2d9b0c6

+ 1 - 1
Config/Schema/key_value.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 class KeyValueSchema extends CakeSchema {
 
 	public function before($event = array()) {

+ 1 - 1
Console/Command/CodeShell.php

@@ -33,7 +33,7 @@ class CodeShell extends AppShell {
 			$this->_paths = array(APP);
 		}
 
- 		$this->_findFiles('php');
+		$this->_findFiles('php');
 		foreach ($this->_files as $file) {
 			$this->out(__d('cake_console', 'Updating %s...', $file), 1, Shell::VERBOSE);
 

+ 21 - 29
Console/Command/IndentShell.php

@@ -78,7 +78,7 @@ class IndentShell extends AppShell {
 					$this->error('...aborted');
 				}
 
-				$this->_correctFiles3();
+				$this->_correctFiles();
 				$this->out('DONE');
 			}
 
@@ -122,7 +122,7 @@ class IndentShell extends AppShell {
 	 *
 	 * 2010-09-12 ms
 	 */
-	protected function _correctFiles3() {
+	protected function _correctFiles() {
 		foreach ($this->_files as $file) {
 			$this->changes = false;
 			$textCorrect = array();
@@ -135,7 +135,7 @@ class IndentShell extends AppShell {
 				if ($this->settings['againWithHalf'] && $spacesPerTab % 2 === 0 && $spacesPerTab > 3) {
 					$tmp = $this->_process($tmp, $spacesPerTab/2);
 				}
-
+				$tmp = $this->_processSpaceErrors($tmp, 1);
 				$textCorrect[] = $tmp;
 			}
 
@@ -156,10 +156,10 @@ class IndentShell extends AppShell {
 		$newPiece = $piece;
 		if ($spacesPerTab) {
 			//TODO
-			while (mb_substr($piece, $pos+1, 1) === ' ' || mb_substr($piece, $pos+1, 1) === TB) {
+			while (mb_substr($piece, $pos+1, 1) === ' ' || mb_substr($piece, $pos + 1, 1) === TB) {
 				$pos++;
 			}
-			$piece1 = mb_substr($piece, 0, $pos+1);
+			$piece1 = mb_substr($piece, 0, $pos + 1);
 			$piece1 = str_replace(str_repeat(' ', $spacesPerTab), TB, $piece1, $count);
 			if ($count > 0) {
 				$this->changes = true;
@@ -186,30 +186,17 @@ class IndentShell extends AppShell {
 	 * @deprecated
 	 * 2010-09-12 ms
 	 */
-	protected function _correctFiles2() {
-		foreach ($this->_files as $file) {
-			$changes = false;
-			$textCorrect = array();
-
-			$pieces = $this->_read($file);
-			foreach ($pieces as $piece) {
-				$spaces = $mod = $tabs = 0;
-				$debug = '';
-
-				$newPiece = $piece;
-				//TODO: make sure no other text is in front of it!!!
-				$newPiece = str_replace(str_repeat(' ', $this->settings['spacesPerTab']), TB, $newPiece, $count);
-				if ($count > 0) {
-					$changes = true;
-				}
+	protected function _processSpaceErrors($piece) {
+		$space = 1;
 
-				$textCorrect[] = rtrim($newPiece) . $debug;
-			}
-
-			if ($changes) {
-				$this->_write($file, $textCorrect);
-			}
+		$newPiece = $piece;
+		if (mb_substr($piece, 0, $space) === ' ' && mb_substr($piece, $space, 1) === TB) {
+			$newPiece = mb_substr($piece, $space);
 		}
+		if ($newPiece != $piece || strlen($newPiece) !== strlen($piece)) {
+			$this->changes = true;
+		}
+		return $newPiece;
 	}
 
 	/**
@@ -219,7 +206,7 @@ class IndentShell extends AppShell {
 	 * @deprecated
 	 * 2010-09-12 ms
 	 */
-	protected function _correctFiles() {
+	protected function _correctFilesTry() {
 		foreach ($this->_files as $file) {
 			$changes = false;
 			$textCorrect = array();
@@ -302,7 +289,12 @@ class IndentShell extends AppShell {
 		foreach ($this->_paths as $path) {
 			$Folder = new Folder($path);
 			$files = $Folder->findRecursive('.*\.('.implode('|', $this->settings['files']).')', true);
-			$this->_files += $files;
+			foreach ($files as $file) {
+				if (strpos($file, DS . 'Vendor' . DS) !== false) {
+					continue;
+				}
+				$this->_files[] = $file;
+			}
 		}
 	}
 

+ 2 - 2
Controller/Component/MobileComponent.php

@@ -139,8 +139,8 @@ class MobileComponent extends Component {
 		}
 
 		if (!$this->themed) {
-	 		$this->serveMobileIfAvailable();
-	 		return;
+			$this->serveMobileIfAvailable();
+			return;
 		}
 
 		$this->Controller->viewClass = 'Theme';

+ 1 - 1
Lib/Bootstrap/MyBootstrap.php

@@ -444,7 +444,7 @@ function pre($var, $collapsedAndExpandable = false, $options = array()) {
 	}
 
 	if ($options['returns']) {
- 		$var = returns($var);
+		$var = returns($var);
 	} else {
 		$var = print_r($var, true);
 	}

+ 7 - 7
Lib/EmailLib.php

@@ -193,8 +193,8 @@ class EmailLib extends CakeEmail {
 			$mimetype = finfo_file($finfo, $filename);
 			finfo_close($finfo);
 		} else {
-	 		//TODO: improve
-	 		$ext = pathinfo($filename, PATHINFO_EXTENSION);
+			//TODO: improve
+			$ext = pathinfo($filename, PATHINFO_EXTENSION);
 			$mimetype = $this->_getMimeByExtension($ext);
 		}
 		return $mimetype;
@@ -600,16 +600,16 @@ class EmailLib extends CakeEmail {
 	 * @return void
 	 */
 	protected function _logEmail($append = null) {
- 		$res = $this->_log['transport'].
+		$res = $this->_log['transport'].
 			' - '.'TO:'.implode(',', array_keys($this->_log['to'])).
 			'||FROM:'.implode(',', array_keys($this->_log['from'])).
 			'||REPLY:'.implode(',', array_keys($this->_log['replyTo'])).
 			'||S:'.$this->_log['subject'];
- 		$type = 'email';
-		 if (!empty($this->_error)) {
+		$type = 'email';
+		if (!empty($this->_error)) {
 		 	$type = 'email_error';
- 			$res .= '||ERROR:' . $this->_error;
- 		}
+			$res .= '||ERROR:' . $this->_error;
+		}
 		if ($append) {
 			$res .= '||'.$append;
 		}

+ 1 - 1
Lib/GeocodeLib.php

@@ -88,7 +88,7 @@ class GeocodeLib {
 		'bounds' => '',
 		'sensor' => 'false', # device with gps module sensor
 		//'key' => '' # not necessary anymore
- 	);
+	);
 
 	protected $error = array();
 	protected $result = null;

+ 4 - 4
Lib/HttpSocketLib.php

@@ -149,10 +149,10 @@ class HttpSocketLib {
 
 			$opts = array(
 				'http' => array(
-            'method' => 'GET',
-            'header' => array('Connection: close'),
-            'timeout' => $options['timeout']
-        )
+				'method' => 'GET',
+				'header' => array('Connection: close'),
+				'timeout' => $options['timeout']
+			)
 			);
 			if (isset($options['http'])) {
 				$opts['http'] = array_merge($opts['http'], $options['http']);

+ 18 - 18
Lib/MimeLib.php

@@ -715,17 +715,17 @@ class MimeLib extends CakeResponse {
 
 	}
 
- 	/**
- 	 * get all mime types that are supported by cake php core right now
- 	 * @return array
- 	 * 2012-02-12 ms
- 	 */
- 	public function getMimeTypes($coreOnly = false) {
- 		if ($coreOnly) {
- 			return $this->_mimeTypes;
- 		}
- 		return array_merge($this->_mimeTypesExt, $this->_mimeTypes);
- 	}
+	/**
+	 * get all mime types that are supported by cake php core right now
+	 * @return array
+	 * 2012-02-12 ms
+	 */
+	public function getMimeTypes($coreOnly = false) {
+		if ($coreOnly) {
+			return $this->_mimeTypes;
+		}
+		return array_merge($this->_mimeTypesExt, $this->_mimeTypes);
+	}
 
 	/**
 	 * Returns the mime type definition for an alias
@@ -735,13 +735,13 @@ class MimeLib extends CakeResponse {
 	 * @param string $alias the content type alias to map
 	 * @return mixed string mapped mime type or false if $alias is not mapped
 	 */
- 	public function getMimeType($alias, $coreOnly = false) {
- 		$res = parent::getMimeType($alias);
- 		if ($res === false && !$coreOnly && isset($this->_mimeTypesExt[$alias])) {
-			return $this->_mimeTypesExt[$alias];
- 		}
- 		return $res;
- 	}
+	public function getMimeType($alias, $coreOnly = false) {
+		$res = parent::getMimeType($alias);
+		if ($res === false && !$coreOnly && isset($this->_mimeTypesExt[$alias])) {
+		return $this->_mimeTypesExt[$alias];
+		}
+		return $res;
+	}
 
 	/**
 	 * Maps a content-type back to an alias

+ 26 - 26
Lib/Misc/ZodiacLib.php

@@ -141,40 +141,40 @@ class ZodiacLib {
 		//TODO
 	}
 
- 	/**
- 	 * list of all signs
- 	 * 2011-03-11 ms
- 	 */
- 	public static function signs($value = null) {
- 		$res = array(
- 			self::SIGN_AQUARIUS	=> __('zodiacAquarius'),
- 			self::SIGN_PISCES	=> __('zodiacPisces'),
- 			self::SIGN_ARIES	=> __('zodiacAries'),
- 			self::SIGN_TAURUS	=> __('zodiacTaurus'),
- 			self::SIGN_GEMINI	=> __('zodiacGemini'),
- 			self::SIGN_CANCER	=> __('zodiacCancer'),
- 			self::SIGN_LEO	=> __('zodiacLeo'),
- 			self::SIGN_VIRGO	=> __('zodiacVirgo'),
- 			self::SIGN_LIBRA	=> __('zodiacLibra'),
- 			self::SIGN_SCORPIO	=> __('zodiacScorpio'),
- 			self::SIGN_SAGITTARIUS	=> __('zodiacSagittarius'),
- 			self::SIGN_CAPRICORN	=> __('zodiacCapricorn'),
+	/**
+	 * list of all signs
+	 * 2011-03-11 ms
+	 */
+	public static function signs($value = null) {
+		$res = array(
+			self::SIGN_AQUARIUS	=> __('zodiacAquarius'),
+			self::SIGN_PISCES	=> __('zodiacPisces'),
+			self::SIGN_ARIES	=> __('zodiacAries'),
+			self::SIGN_TAURUS	=> __('zodiacTaurus'),
+			self::SIGN_GEMINI	=> __('zodiacGemini'),
+			self::SIGN_CANCER	=> __('zodiacCancer'),
+			self::SIGN_LEO	=> __('zodiacLeo'),
+			self::SIGN_VIRGO	=> __('zodiacVirgo'),
+			self::SIGN_LIBRA	=> __('zodiacLibra'),
+			self::SIGN_SCORPIO	=> __('zodiacScorpio'),
+			self::SIGN_SAGITTARIUS	=> __('zodiacSagittarius'),
+			self::SIGN_CAPRICORN	=> __('zodiacCapricorn'),
 		);
 		if ($value === null) {
 			return $res;
 		}
 		return $res[$value];
- 	}
+	}
 
- 	public static function image($sign) {
+	public static function image($sign) {
 		return self::$res[$sign];
- 	}
+	}
 
- 	const SIGN_AQUARIUS = 1; # from 20.01. to 18.02.
- 	const SIGN_PISCES = 2; # from 19 Febbraio to 20 marzo
- 	const SIGN_ARIES = 3;
- 	const SIGN_TAURUS = 4;
- 	const SIGN_GEMINI = 5;
+	const SIGN_AQUARIUS = 1; # from 20.01. to 18.02.
+	const SIGN_PISCES = 2; # from 19 Febbraio to 20 marzo
+	const SIGN_ARIES = 3;
+	const SIGN_TAURUS = 4;
+	const SIGN_GEMINI = 5;
 	const SIGN_CANCER = 6;
 	const SIGN_LEO = 7;
 	const SIGN_VIRGO = 8; # from 23.08. to 22.09.

+ 4 - 4
Lib/Utility/TimeLib.php

@@ -398,10 +398,10 @@ class TimeLib extends CakeTime {
 	 * outputs Date(time) Sting nicely formatted (+ localized!)
 	 * @param string $dateString,
 	 * @param string $format (YYYY-MM-DD, DD.MM.YYYY)
- 	 * @param array $options
+	 * @param array $options
 		* - timezone: User's timezone
 		* - default (defaults to "-----")
- 	 * 2009-03-31 ms
+	 * 2009-03-31 ms
 	 */
 	public static function localDate($dateString = null, $format = null, $options = array()) {
 		$defaults = array('default' => '-----', 'timezone' => null);
@@ -429,10 +429,10 @@ class TimeLib extends CakeTime {
 	 * outputs Date(time) Sting nicely formatted
 	 * @param string $dateString,
 	 * @param string $format (YYYY-MM-DD, DD.MM.YYYY)
- 	 * @param array $options
+	 * @param array $options
 		* - timezone: User's timezone
 		* - default (defaults to "-----")
- 	 * 2009-03-31 ms
+	 * 2009-03-31 ms
 	 */
 	public static function niceDate($dateString = null, $format = null, $options = array()) {
 		$defaults = array('default'=>'-----', 'timezone'=>null);

+ 16 - 16
Test/Fixture/RevisionArticleFixture.php

@@ -3,43 +3,43 @@ class RevisionArticleFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
-			'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
+			'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL),
 			'parent_id' => array('type' => 'integer','null' => true,'default' => NULL),
 			'lft' => array('type' => 'integer','null' => true,'default' => NULL),
 			'rght' => array('type' => 'integer','null' => true,'default' => NULL),
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
-			'content' => array('type' => 'text', 'null' => false, 'default' => NULL), 
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
+			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
 	public $records = array(
 		array(
-			'id' => 1, 
-			'user_id' => 1, 
+			'id' => 1,
+			'user_id' => 1,
 			'parent_id' => null,
 			'lft' => 1,
 			'rght' => 6,
-			'title' => 'Lorem ipsum dolor sit amet', 
+			'title' => 'Lorem ipsum dolor sit amet',
 			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.'
 		),
 		array(
-			'id' => 2, 
-			'user_id' => 1, 
+			'id' => 2,
+			'user_id' => 1,
 			'parent_id' => 1,
 			'lft' => 2,
 			'rght' => 3,
-			'title' => 'Lorem ipsum', 
+			'title' => 'Lorem ipsum',
 			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.'
 		),
 		array(
-			'id' => 3, 
-			'user_id' => 1, 
+			'id' => 3,
+			'user_id' => 1,
 			'parent_id' => 1,
 			'lft' => 4,
 			'rght' => 5,
-			'title' => 'Lorem ipsum', 
+			'title' => 'Lorem ipsum',
 			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.'
 		),
 	);

+ 5 - 5
Test/Fixture/RevisionArticlesRevFixture.php

@@ -2,12 +2,12 @@
 class RevisionArticlesRevFixture extends CakeTestFixture {
 
 	public $fields = array(
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
-			'id' => array('type' => 'integer','null' => false,'default' => NULL), 
-			'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL), 
-			'parent_id' => array('type' => 'integer','null' => true,'default' => NULL), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
+			'id' => array('type' => 'integer','null' => false,'default' => NULL),
+			'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL),
+			'parent_id' => array('type' => 'integer','null' => true,'default' => NULL),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
 			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'indexes' => array('PRIMARY' => array('column' => 'version_id')));
 	public $records = array(

+ 15 - 15
Test/Fixture/RevisionCommentFixture.php

@@ -4,28 +4,28 @@ class RevisionCommentFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
-			'content' => array('type' => 'text', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
+			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
 	public $records = array(
 		array(
-			'id' => 1, 
-			'title' => 'Comment 1', 
-			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.', 
+			'id' => 1,
+			'title' => 'Comment 1',
+			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.',
 		),
 		array(
-			'id' => 2, 
-			'title' => 'Comment 2', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 2,
+			'title' => 'Comment 2',
+			'content' => 'Lorem ipsum dolor sit.',
 		),
 		array(
-			'id' => 3, 
-			'title' => 'Comment 3', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 3,
+			'title' => 'Comment 3',
+			'content' => 'Lorem ipsum dolor sit.',
 		),
 	);
 }

+ 17 - 17
Test/Fixture/RevisionCommentsRevFixture.php

@@ -1,40 +1,40 @@
 <?php
 class RevisionCommentsRevFixture extends CakeTestFixture {
 
-	public $fields = array(	
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+	public $fields = array(
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
 			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'Tag' => array('type' => 'string', 'null' => true, 'default' => NULL)
 	);
-	public $records = array(	
+	public $records = array(
 		array(
 			'version_id' => 1,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 1, 
-			'title' => 'Comment 1', 
-			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.', 
+			'id' => 1,
+			'title' => 'Comment 1',
+			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.',
 			'Tag' => '1,2,3'
-		),	
+		),
 		array(
 			'version_id' => 2,
 			'version_created' => '2008-12-08 11:38:54',
-			'id' => 2, 
-			'title' => 'Comment 2', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 2,
+			'title' => 'Comment 2',
+			'content' => 'Lorem ipsum dolor sit.',
 			'Tag' => '1,3'
 		),
 		array(
 			'version_id' => 3,
 			'version_created' => '2008-12-08 11:38:55',
-			'id' => 3, 
-			'title' => 'Comment 3', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 3,
+			'title' => 'Comment 3',
+			'content' => 'Lorem ipsum dolor sit.',
 			'Tag' => null
 		),
 	);

+ 17 - 17
Test/Fixture/RevisionCommentsRevisionTagFixture.php

@@ -3,38 +3,38 @@ class RevisionCommentsRevisionTagFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
-			'revision_comment_id' => array('type' => 'integer', 'null' => false), 
-			'revision_tag_id' => array('type' => 'integer', 'null' => false), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
+			'revision_comment_id' => array('type' => 'integer', 'null' => false),
+			'revision_tag_id' => array('type' => 'integer', 'null' => false),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
-	
+
 	public $records = array(
 		array(
-			'id' => 1, 
-			'revision_comment_id' => 1, 
+			'id' => 1,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 1
 		),
 		array(
-			'id' => 2, 
-			'revision_comment_id' => 1, 
+			'id' => 2,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 2
 		),
 		array(
-			'id' => 3, 
-			'revision_comment_id' => 1, 
+			'id' => 3,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 3
 		),
 		array(
-			'id' => 4, 
-			'revision_comment_id' => 2, 
+			'id' => 4,
+			'revision_comment_id' => 2,
 			'revision_tag_id' => 1
 		),
 		array(
-			'id' => 5, 
-			'revision_comment_id' => 2, 
+			'id' => 5,
+			'revision_comment_id' => 2,
 			'revision_tag_id' => 3
 		),
 	);

+ 15 - 15
Test/Fixture/RevisionCommentsRevisionTagsRevFixture.php

@@ -2,47 +2,47 @@
 class RevisionCommentsRevisionTagsRevFixture extends CakeTestFixture {
 
 	public $fields = array(
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
-			'id' => array('type' => 'integer','null' => false), 
-			'revision_comment_id' => array('type' => 'integer', 'null' => false), 
-			'revision_tag_id' => array('type' => 'integer', 'null' => false), 
+			'id' => array('type' => 'integer','null' => false),
+			'revision_comment_id' => array('type' => 'integer', 'null' => false),
+			'revision_tag_id' => array('type' => 'integer', 'null' => false),
 			'indexes' => array('PRIMARY' => array('column' => 'version_id')));
-	
+
 	public $records = array(
 		array(
 			'version_id' => 1,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 1, 
-			'revision_comment_id' => 1, 
+			'id' => 1,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 1
 		),
 		array(
 			'version_id' => 2,
 			'version_created' => '2008-12-08 11:38:55',
-			'id' => 2, 
-			'revision_comment_id' => 1, 
+			'id' => 2,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 2
 		),
 		array(
 			'version_id' => 3,
 			'version_created' => '2008-12-08 11:38:56',
-			'id' => 3, 
-			'revision_comment_id' => 1, 
+			'id' => 3,
+			'revision_comment_id' => 1,
 			'revision_tag_id' => 3
 		),
 		array(
 			'version_id' => 4,
 			'version_created' => '2008-12-08 11:38:57',
-			'id' => 4, 
-			'revision_comment_id' => 2, 
+			'id' => 4,
+			'revision_comment_id' => 2,
 			'revision_tag_id' => 1
 		),
 		array(
 			'version_id' => 5,
 			'version_created' => '2008-12-08 11:38:58',
-			'id' => 5, 
-			'revision_comment_id' => 2, 
+			'id' => 5,
+			'revision_comment_id' => 2,
 			'revision_tag_id' => 3
 		),
 	);

+ 13 - 13
Test/Fixture/RevisionPostFixture.php

@@ -3,28 +3,28 @@ class RevisionPostFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
-			'content' => array('type' => 'text', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
+			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
 	public $records = array(
 		array(
-			'id' => 1, 
-			'title' => 'Lorem ipsum dolor sit amet', 
+			'id' => 1,
+			'title' => 'Lorem ipsum dolor sit amet',
 			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.'
 		),
 		array(
-			'id' => 2, 
-			'title' => 'Post 2', 
+			'id' => 2,
+			'title' => 'Post 2',
 			'content' => 'Lorem ipsum dolor sit.'
 		),
 		array(
-			'id' => 3, 
-			'title' => 'Post 3', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 3,
+			'title' => 'Post 3',
+			'content' => 'Lorem ipsum dolor sit.',
 		),
 	);
 }

+ 12 - 12
Test/Fixture/RevisionPostsRevFixture.php

@@ -2,32 +2,32 @@
 class RevisionPostsRevFixture extends CakeTestFixture {
 
 	public $fields = array(
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
-			'id' => array('type' => 'integer','null' => false,'default' => NULL), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
+			'id' => array('type' => 'integer','null' => false,'default' => NULL),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
 			'content' => array('type' => 'text', 'null' => false, 'default' => NULL));
 	public $records = array(
-		array(			
+		array(
 			'version_id' => 1,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 1, 
-			'title' => 'Lorem ipsum dolor sit amet', 
+			'id' => 1,
+			'title' => 'Lorem ipsum dolor sit amet',
 			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.'
-		),	
+		),
 		array(
 			'version_id' => 2,
 			'version_created' => '2008-12-08 11:38:54',
-			'id' => 2, 
-			'title' => 'Post 2', 
+			'id' => 2,
+			'title' => 'Post 2',
 			'content' => 'Lorem ipsum dolor sit.'
 		),
 		array(
 			'version_id' => 3,
 			'version_created' => '2008-12-08 11:38:55',
-			'id' => 3, 
-			'title' => 'Post 3', 
-			'content' => 'Lorem ipsum dolor sit.', 
+			'id' => 3,
+			'title' => 'Post 3',
+			'content' => 'Lorem ipsum dolor sit.',
 		),
 	);
 }

+ 10 - 10
Test/Fixture/RevisionTagFixture.php

@@ -3,28 +3,28 @@ class RevisionTagFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
 			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
-	
+
 	public $records = array(
 		array(
-			'id' => 1, 
-			'title' => 'Fun', 
+			'id' => 1,
+			'title' => 'Fun',
 		),
 		array(
-			'id' => 2, 
+			'id' => 2,
 			'title' => 'Hard'
 		),
 		array(
-			'id' => 3, 
+			'id' => 3,
 			'title' => 'Trick'
 		),
 		array(
-			'id' => 4, 
+			'id' => 4,
 			'title' => 'News'
 		),
 	);

+ 9 - 9
Test/Fixture/RevisionTagsRevFixture.php

@@ -2,40 +2,40 @@
 
 class RevisionTagsRevFixture extends CakeTestFixture {
 
-	public $fields = array(	
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+	public $fields = array(
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
-			'id' => array('type' => 'integer', 'null' => false,'default' => NULL), 
+			'id' => array('type' => 'integer', 'null' => false,'default' => NULL),
 			'title' => array('type' => 'string', 'null' => false, 'default' => NULL)
 	);
-	
+
 	public $records = array(
 		array(
-			'version_id' => 1, 
+			'version_id' => 1,
 			'version_created' => '2008-12-24 11:00:01',
 			'id' => 1,
 			'title' => 'Fun'
 		),
 		array(
-			'version_id' => 2, 
+			'version_id' => 2,
 			'version_created' => '2008-12-24 11:00:02',
 			'id' => 2,
 			'title' => 'Hard'
 		),
 		array(
-			'version_id' => 3, 
+			'version_id' => 3,
 			'version_created' => '2008-12-24 11:00:03',
 			'id' => 3,
 			'title' => 'Tricks'
 		),
 		array(
-			'version_id' => 4, 
+			'version_id' => 4,
 			'version_created' => '2008-12-24 11:00:04',
 			'id' => 3,
 			'title' => 'Trick'
 		),
 		array(
-			'version_id' => 5, 
+			'version_id' => 5,
 			'version_created' => '2008-12-24 11:00:22',
 			'id' => 4,
 			'title' => 'News'

+ 1 - 1
Test/Fixture/RevisionUserFixture.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 class RevisionUserFixture extends CakeTestFixture {
 
 	public $fields = array(

+ 14 - 14
Test/Fixture/RevisionVoteFixture.php

@@ -4,31 +4,31 @@ class RevisionVoteFixture extends CakeTestFixture {
 
 	public $fields = array(
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL, 
-					'key' => 'primary'), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
-			'content' => array('type' => 'text', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL,
+					'key' => 'primary'),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
+			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'revision_comment_id' => array('type'=>'integer','null'=>false),
 			'indexes' => array('PRIMARY' => array('column' => 'id')));
-	
+
 	public $records = array(
 		array(
-			'id' => 1, 
-			'title' => 'Lorem ipsum dolor sit amet', 
-			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.', 
+			'id' => 1,
+			'title' => 'Lorem ipsum dolor sit amet',
+			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.',
 			'revision_comment_id' => 1
 		),
 		array(
-			'id' => 2, 
-			'title' => 'Stuff', 
+			'id' => 2,
+			'title' => 'Stuff',
 			'content' => 'Lorem ipsum dolor sit.',
 			'revision_comment_id' => 1
 		),
 		array(
-			'id' => 3, 
-			'title' => 'Stuff', 
+			'id' => 3,
+			'title' => 'Stuff',
 			'content' => 'Lorem ipsum dolor sit.',
 			'revision_comment_id' => 2
 		),

+ 15 - 15
Test/Fixture/RevisionVotesRevFixture.php

@@ -1,39 +1,39 @@
 <?php
 class RevisionVotesRevFixture extends CakeTestFixture {
 
-	public $fields = array(	
-			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'), 
+	public $fields = array(
+			'version_id' => array('type' => 'integer','null' => false,'default' => NULL,'key' => 'primary'),
 			'version_created' => array('type' => 'datetime', 'null' => false, 'default' => NULL),
 			'id' => array(
-					'type' => 'integer', 
-					'null' => false, 
-					'default' => NULL), 
-			'title' => array('type' => 'string', 'null' => false, 'default' => NULL), 
-			'content' => array('type' => 'text', 'null' => false, 'default' => NULL), 
+					'type' => 'integer',
+					'null' => false,
+					'default' => NULL),
+			'title' => array('type' => 'string', 'null' => false, 'default' => NULL),
+			'content' => array('type' => 'text', 'null' => false, 'default' => NULL),
 			'revision_comment_id' => array('type'=>'integer','null'=>false));
-	
+
 	public $records = array(
 		array(
 			'version_id' => 1,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 1, 
-			'title' => 'Lorem ipsum dolor sit amet', 
-			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.', 
+			'id' => 1,
+			'title' => 'Lorem ipsum dolor sit amet',
+			'content' => 'Lorem ipsum dolor sit amet, aliquet feugiat.',
 			'revision_comment_id' => 1
 		),
 		array(
 			'version_id' => 2,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 2, 
-			'title' => 'Stuff', 
+			'id' => 2,
+			'title' => 'Stuff',
 			'content' => 'Lorem ipsum dolor sit.',
 			'revision_comment_id' => 1
 		),
 		array(
 			'version_id' => 3,
 			'version_created' => '2008-12-08 11:38:53',
-			'id' => 3, 
-			'title' => 'Stuff', 
+			'id' => 3,
+			'title' => 'Stuff',
 			'content' => 'Lorem ipsum dolor sit.',
 			'revision_comment_id' => 2
 		),

+ 1 - 1
View/Helper/CaptchaHelper.php

@@ -168,7 +168,7 @@ class CaptchaHelper extends AppHelper {
 	/**
 	 * active captcha
 	 * (+ passive captcha right now)
-	 * 
+	 *
 	 * @return string Form input
 	 * 2010-01-08 ms
 	 */