Skip to content
This repository
Browse code

coding standards regarding whitespaces

  • Loading branch information...
commit 0f978195d6944d44fb4b0afcfba8b071a576da6a 1 parent 5324a8c
Mark authored
2  lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -129,7 +129,7 @@ public function beforeFind(Model $Model, $query) {
129 129
 				'conditions' => array(
130 130
 					$Model->escapeField() => $db->identifier($RuntimeModel->escapeField('foreign_key')),
131 131
 					$RuntimeModel->escapeField('model') => $Model->name,
132  
-					$RuntimeModel->escapeField('locale')  => $locale
  132
+					$RuntimeModel->escapeField('locale') => $locale
133 133
 				)
134 134
 			);
135 135
 			$conditionFields = $this->_checkConditions($Model, $query);
6  lib/Cake/Model/CakeSchema.php
@@ -418,12 +418,12 @@ public function generateTable($table, $fields) {
418 418
 					}
419 419
 					$col = "\t\t'{$field}' => array('type' => '" . $value['type'] . "', ";
420 420
 					unset($value['type']);
421  
-					$col .= implode(', ',  $this->_values($value));
  421
+					$col .= implode(', ', $this->_values($value));
422 422
 				} elseif ($field == 'indexes') {
423 423
 					$col = "\t\t'indexes' => array(\n\t\t\t";
424 424
 					$props = array();
425 425
 					foreach ((array)$value as $key => $index) {
426  
-						$props[] = "'{$key}' => array(" . implode(', ',  $this->_values($index)) . ")";
  426
+						$props[] = "'{$key}' => array(" . implode(', ', $this->_values($index)) . ")";
427 427
 					}
428 428
 					$col .= implode(",\n\t\t\t", $props) . "\n\t\t";
429 429
 				} elseif ($field == 'tableParameters') {
@@ -580,7 +580,7 @@ protected function _values($values) {
580 580
 		if (is_array($values)) {
581 581
 			foreach ($values as $key => $val) {
582 582
 				if (is_array($val)) {
583  
-					$vals[] = "'{$key}' => array('" . implode("', '",  $val) . "')";
  583
+					$vals[] = "'{$key}' => array('" . implode("', '", $val) . "')";
584 584
 				} elseif (!is_numeric($key)) {
585 585
 					$val = var_export($val, true);
586 586
 					if ($val === 'NULL') {
2  lib/Cake/Utility/ClassRegistry.php
@@ -303,7 +303,7 @@ public static function config($type, $param = array()) {
303 303
  * @param string $class
304 304
  * @return boolean
305 305
  */
306  
-	protected function &_duplicate($alias,  $class) {
  306
+	protected function &_duplicate($alias, $class) {
307 307
 		$duplicate = false;
308 308
 		if ($this->isKeySet($alias)) {
309 309
 			$model = $this->getObject($alias);
8  lib/Cake/Utility/Debugger.php
@@ -295,9 +295,9 @@ public static function trace($options = array()) {
295 295
 		$back = array();
296 296
 
297 297
 		$_trace = array(
298  
-			'line'     => '??',
299  
-			'file'     => '[internal]',
300  
-			'class'    => null,
  298
+			'line' => '??',
  299
+			'file' => '[internal]',
  300
+			'class' => null,
301 301
 			'function' => '[main]'
302 302
 		);
303 303
 
@@ -510,7 +510,7 @@ protected static function _export($var, $depth, $indent) {
510 510
 	protected static function _array(array $var, $depth, $indent) {
511 511
 		$secrets = array(
512 512
 			'password' => '*****',
513  
-			'login'  => '*****',
  513
+			'login' => '*****',
514 514
 			'host' => '*****',
515 515
 			'database' => '*****',
516 516
 			'port' => '*****',
34  lib/Cake/Utility/Validation.php
@@ -326,13 +326,13 @@ public static function date($check, $format = 'ymd', $regex = null) {
326 326
  * Use a string or an array of the keys below. Arrays should be passed as array('dmy', 'mdy', etc)
327 327
  * ## Keys:
328 328
  *
329  
- *	- dmy 27-12-2006 or 27-12-06 separators can be a space, period, dash, forward slash
330  
- *	- mdy 12-27-2006 or 12-27-06 separators can be a space, period, dash, forward slash
331  
- *	- ymd 2006-12-27 or 06-12-27 separators can be a space, period, dash, forward slash
332  
- *  - dMy 27 December 2006 or 27 Dec 2006
333  
- *	- Mdy December 27, 2006 or Dec 27, 2006 comma is optional
334  
- *	- My December 2006 or Dec 2006
335  
- * 	- my 12/2006 separators can be a space, period, dash, forward slash
  329
+ * - dmy 27-12-2006 or 27-12-06 separators can be a space, period, dash, forward slash
  330
+ * - mdy 12-27-2006 or 12-27-06 separators can be a space, period, dash, forward slash
  331
+ * - ymd 2006-12-27 or 06-12-27 separators can be a space, period, dash, forward slash
  332
+ * - dMy 27 December 2006 or 27 Dec 2006
  333
+ * - Mdy December 27, 2006 or Dec 27, 2006 comma is optional
  334
+ * - My December 2006 or Dec 2006
  335
+ * - my 12/2006 separators can be a space, period, dash, forward slash
336 336
  * @param string $regex Regex for the date part. If a custom regular expression is used this is the only validation that will occur.
337 337
  * @return boolean True if the value is valid, false otherwise
338 338
  * @see Validation::date
@@ -616,7 +616,7 @@ public static function phone($check, $regex = null, $country = 'all') {
616 616
 				case 'can':
617 617
 					// includes all NANPA members.
618 618
 					// see http://en.wikipedia.org/wiki/North_American_Numbering_Plan#List_of_NANPA_countries_and_territories
619  
-					$regex  = '/^(?:\+?1)?[-. ]?\\(?[2-9][0-8][0-9]\\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}$/';
  619
+					$regex = '/^(?:\+?1)?[-. ]?\\(?[2-9][0-8][0-9]\\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}$/';
620 620
 				break;
621 621
 			}
622 622
 		}
@@ -642,20 +642,20 @@ public static function postal($check, $regex = null, $country = 'us') {
642 642
 		if (is_null($regex)) {
643 643
 			switch ($country) {
644 644
 				case 'uk':
645  
-					$regex  = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
  645
+					$regex = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
646 646
 					break;
647 647
 				case 'ca':
648  
-					$regex  = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
  648
+					$regex = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
649 649
 					break;
650 650
 				case 'it':
651 651
 				case 'de':
652  
-					$regex  = '/^[0-9]{5}$/i';
  652
+					$regex = '/^[0-9]{5}$/i';
653 653
 					break;
654 654
 				case 'be':
655  
-					$regex  = '/^[1-9]{1}[0-9]{3}$/i';
  655
+					$regex = '/^[1-9]{1}[0-9]{3}$/i';
656 656
 					break;
657 657
 				case 'us':
658  
-					$regex  = '/\\A\\b[0-9]{5}(?:-[0-9]{4})?\\b\\z/i';
  658
+					$regex = '/\\A\\b[0-9]{5}(?:-[0-9]{4})?\\b\\z/i';
659 659
 					break;
660 660
 			}
661 661
 		}
@@ -701,13 +701,13 @@ public static function ssn($check, $regex = null, $country = null) {
701 701
 		if (is_null($regex)) {
702 702
 			switch ($country) {
703 703
 				case 'dk':
704  
-					$regex  = '/\\A\\b[0-9]{6}-[0-9]{4}\\b\\z/i';
  704
+					$regex = '/\\A\\b[0-9]{6}-[0-9]{4}\\b\\z/i';
705 705
 					break;
706 706
 				case 'nl':
707  
-					$regex  = '/\\A\\b[0-9]{9}\\b\\z/i';
  707
+					$regex = '/\\A\\b[0-9]{9}\\b\\z/i';
708 708
 					break;
709 709
 				case 'us':
710  
-					$regex  = '/\\A\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b\\z/i';
  710
+					$regex = '/\\A\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b\\z/i';
711 711
 					break;
712 712
 			}
713 713
 		}
@@ -943,7 +943,7 @@ public static function uploadError($check) {
943 943
  */
944 944
 	protected static function _populateIp() {
945 945
 		if (!isset(self::$_pattern['IPv6'])) {
946  
-			$pattern  = '((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}';
  946
+			$pattern = '((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}';
947 947
 			$pattern .= '(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})';
948 948
 			$pattern .= '|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})';
949 949
 			$pattern .= '(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)';
2  lib/Cake/Utility/Xml.php
@@ -110,7 +110,7 @@ public static function build($input, $options = array()) {
110 110
  * Parse the input data and create either a SimpleXmlElement object or a DOMDocument.
111 111
  *
112 112
  * @param string $input The input to load.
113  
- * @param array  $options The options to use. See Xml::build()
  113
+ * @param array $options The options to use. See Xml::build()
114 114
  * @return SimpleXmlElement|DOMDocument.
115 115
  */
116 116
 	protected static function _loadXml($input, $options) {
2  lib/Cake/View/Helper/HtmlHelper.php
@@ -558,7 +558,7 @@ public function script($url, $options = array()) {
558 558
 	public function scriptBlock($script, $options = array()) {
559 559
 		$options += array('safe' => true, 'inline' => true);
560 560
 		if ($options['safe']) {
561  
-			$script  = "\n" . '//<![CDATA[' . "\n" . $script . "\n" . '//]]>' . "\n";
  561
+			$script = "\n" . '//<![CDATA[' . "\n" . $script . "\n" . '//]]>' . "\n";
562 562
 		}
563 563
 		if (!$options['inline'] && empty($options['block'])) {
564 564
 			$options['block'] = 'script';
2  lib/Cake/bootstrap.php
@@ -134,7 +134,7 @@
134 134
 require CAKE . 'Error' . DS . 'exceptions.php';
135 135
 
136 136
 /**
137  
- *  Full url prefix
  137
+ * Full url prefix
138 138
  */
139 139
 if (!defined('FULL_BASE_URL')) {
140 140
 	$s = null;

0 notes on commit 0f97819

Please sign in to comment.
Something went wrong with that request. Please try again.