Skip to content
This repository
Browse code

Coding standards fixes

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8260 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit f88cc56cfe01b9441845d8121828d9815fa6e67e 1 parent 47cd941
Tim Koschuetzki authored July 28, 2009

Showing 32 changed files with 105 additions and 110 deletions. Show diff stats Hide diff stats

  1. 2  cake/console/libs/schema.php
  2. 2  cake/console/libs/shell.php
  3. 14  cake/console/libs/tasks/controller.php
  4. 8  cake/console/libs/tasks/model.php
  5. 6  cake/console/libs/tasks/project.php
  6. 2  cake/console/libs/tasks/test.php
  7. 6  cake/console/libs/templates/views/form.ctp
  8. 2  cake/console/libs/templates/views/home.ctp
  9. 4  cake/console/libs/templates/views/index.ctp
  10. 18  cake/console/libs/templates/views/view.ctp
  11. 14  cake/libs/controller/components/cookie.php
  12. 6  cake/libs/http_socket.php
  13. 35  cake/libs/model/datasources/dbo/dbo_mysqli.php
  14. 4  cake/libs/model/schema.php
  15. 6  cake/libs/view/errors/missing_action.ctp
  16. 6  cake/libs/view/errors/missing_component_class.ctp
  17. 4  cake/libs/view/errors/missing_component_file.ctp
  18. 6  cake/libs/view/errors/missing_controller.ctp
  19. 4  cake/libs/view/errors/missing_helper_class.ctp
  20. 6  cake/libs/view/errors/missing_helper_file.ctp
  21. 6  cake/libs/view/errors/missing_layout.ctp
  22. 4  cake/libs/view/errors/missing_model.ctp
  23. 4  cake/libs/view/errors/missing_scaffolddb.ctp
  24. 4  cake/libs/view/errors/missing_table.ctp
  25. 4  cake/libs/view/errors/missing_view.ctp
  26. 4  cake/libs/view/errors/private_action.ctp
  27. 2  cake/libs/view/errors/scaffold_error.ctp
  28. 4  cake/libs/view/scaffolds/edit.ctp
  29. 4  cake/libs/view/scaffolds/index.ctp
  30. 16  cake/libs/view/scaffolds/view.ctp
  31. 4  cake/tests/cases/libs/http_socket.test.php
  32. 4  cake/tests/cases/libs/sanitize.test.php
2  cake/console/libs/schema.php
@@ -199,7 +199,7 @@ function dump() {
199 199
 			}
200 200
 		}
201 201
 		$db =& ConnectionManager::getDataSource($this->Schema->connection);
202  
-		$contents = "#". $Schema->name ." sql generated on: " . date('Y-m-d H:i:s') . " : ". time()."\n\n";
  202
+		$contents = "#" . $Schema->name . " sql generated on: " . date('Y-m-d H:i:s') . " : " . time() . "\n\n";
203 203
 		$contents .= $db->dropSchema($Schema) . "\n\n". $db->createSchema($Schema);
204 204
 		if ($write) {
205 205
 			if (strpos($write, '.sql') === false) {
2  cake/console/libs/shell.php
@@ -297,7 +297,7 @@ function loadTasks() {
297 297
 			}
298 298
 
299 299
 			if (!isset($this->{$taskName})) {
300  
-				$this->err("Task '".$taskName."' could not be loaded");
  300
+				$this->err("Task '" . $taskName . "' could not be loaded");
301 301
 				$this->_stop();
302 302
 			}
303 303
 		}
14  cake/console/libs/tasks/controller.php
@@ -273,7 +273,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
273 273
 			$actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action'=>'index'));\n";
274 274
 		}
275 275
 		$actions .= "\t\t}\n";
276  
-		$actions .= "\t\t\$this->set('".$singularName."', \$this->{$currentModelName}->read(null, \$id));\n";
  276
+		$actions .= "\t\t\$this->set('" . $singularName . "', \$this->{$currentModelName}->read(null, \$id));\n";
277 277
 		$actions .= "\t}\n";
278 278
 		$actions .= "\n";
279 279
 
@@ -284,7 +284,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
284 284
 		$actions .= "\t\t\t\$this->{$currentModelName}->create();\n";
285 285
 		$actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n";
286 286
 		if ($wannaUseSession) {
287  
-			$actions .= "\t\t\t\t\$this->Session->setFlash(__('The ".$singularHumanName." has been saved', true));\n";
  287
+			$actions .= "\t\t\t\t\$this->Session->setFlash(__('The " . $singularHumanName . " has been saved', true));\n";
288 288
 			$actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'));\n";
289 289
 		} else {
290 290
 			$actions .= "\t\t\t\t\$this->flash(__('{$currentModelName} saved.', true), array('action'=>'index'));\n";
@@ -313,7 +313,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
313 313
 			}
314 314
 		}
315 315
 		if (!empty($compact)) {
316  
-			$actions .= "\t\t\$this->set(compact(".join(', ', $compact)."));\n";
  316
+			$actions .= "\t\t\$this->set(compact(" . join(', ', $compact) . "));\n";
317 317
 		}
318 318
 		$actions .= "\t}\n";
319 319
 		$actions .= "\n";
@@ -332,10 +332,10 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
332 332
 		$actions .= "\t\tif (!empty(\$this->data)) {\n";
333 333
 		$actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n";
334 334
 		if ($wannaUseSession) {
335  
-			$actions .= "\t\t\t\t\$this->Session->setFlash(__('The ".$singularHumanName." has been saved', true));\n";
  335
+			$actions .= "\t\t\t\t\$this->Session->setFlash(__('The " . $singularHumanName . " has been saved', true));\n";
336 336
 			$actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'));\n";
337 337
 		} else {
338  
-			$actions .= "\t\t\t\t\$this->flash(__('The ".$singularHumanName." has been saved.', true), array('action'=>'index'));\n";
  338
+			$actions .= "\t\t\t\t\$this->flash(__('The " . $singularHumanName . " has been saved.', true), array('action'=>'index'));\n";
339 339
 		}
340 340
 		$actions .= "\t\t\t} else {\n";
341 341
 		if ($wannaUseSession) {
@@ -365,7 +365,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
365 365
 			}
366 366
 		}
367 367
 		if (!empty($compact)) {
368  
-			$actions .= "\t\t\$this->set(compact(".join(',', $compact)."));\n";
  368
+			$actions .= "\t\t\$this->set(compact(" . join(',', $compact) . "));\n";
369 369
 		}
370 370
 		$actions .= "\t}\n";
371 371
 		$actions .= "\n";
@@ -484,7 +484,7 @@ function bakeTest($className) {
484 484
 		$this->out("\nBaking unit test for $className...");
485 485
 
486 486
 		$header = '$Id';
487  
-		$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ."Controller Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
  487
+		$content = "<?php \n/* SVN FILE: $header$ */\n/* " . $className . "Controller Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
488 488
 		return $this->createFile($path . $filename, $content);
489 489
 	}
490 490
 /**
8  cake/console/libs/tasks/model.php
@@ -733,7 +733,7 @@ function bakeTest($className, $useTable = null, $associations = array()) {
733 733
 			$this->out("\nBaking unit test for $className...");
734 734
 
735 735
 			$header = '$Id';
736  
-			$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ." Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
  736
+			$content = "<?php \n/* SVN FILE: $header$ */\n/* " . $className . " Test cases generated on: " . date('Y-m-d H:i:s') . " : " . time() . "*/\n{$out}?>";
737 737
 			return $this->createFile($path . $filename, $content);
738 738
 		}
739 739
 		return false;
@@ -905,7 +905,7 @@ function fixture($model, $useTable = null) {
905 905
 							$col = "\t\t'indexes' => array(";
906 906
 							$props = array();
907 907
 							foreach ((array)$value as $key => $index) {
908  
-								$props[] = "'{$key}' => array(".join(', ',  $schema->__values($index)).")";
  908
+								$props[] = "'{$key}' => array(" . join(', ',  $schema->__values($index)) . ")";
909 909
 							}
910 910
 							$col .= join(', ', $props);
911 911
 						}
@@ -925,9 +925,9 @@ function fixture($model, $useTable = null) {
925 925
 			$pluginPath = 'plugins' . DS . Inflector::underscore($this->plugin) . DS;
926 926
 			$path = APP . $pluginPath . 'tests' . DS . 'fixtures' . DS;
927 927
 		}
928  
-		$filename = Inflector::underscore($model).'_fixture.php';
  928
+		$filename = Inflector::underscore($model) . '_fixture.php';
929 929
 		$header = '$Id';
930  
-		$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $model ." Fixture generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
  930
+		$content = "<?php \n/* SVN FILE: $header$ */\n/* " . $model . " Fixture generated on: " . date('Y-m-d H:i:s') . " : " . time() . "*/\n{$out}?>";
931 931
 		$this->out("\nBaking test fixture for $model...");
932 932
 		if ($this->createFile($path . $filename, $content)) {
933 933
 			return str_replace("\t\t", "\t\t\t", $records);
6  cake/console/libs/tasks/project.php
@@ -153,7 +153,7 @@ function bake($path, $skel = null, $skip = array('empty')) {
153 153
 				$this->out(sprintf(__("Created: %s in %s", true), $app, $path));
154 154
 				$this->hr();
155 155
 			} else {
156  
-				$this->err(" '".$app."' could not be created properly");
  156
+				$this->err(" '" . $app . "' could not be created properly");
157 157
 				return false;
158 158
 			}
159 159
 
@@ -219,7 +219,7 @@ function corePath($path) {
219 219
 			$File =& new File($path . 'webroot' . DS . 'index.php');
220 220
 			$contents = $File->read();
221 221
 			if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) {
222  
-				$result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '".CAKE_CORE_INCLUDE_PATH."');", $contents);
  222
+				$result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '" . CAKE_CORE_INCLUDE_PATH . "');", $contents);
223 223
 				if (!$File->write($result)) {
224 224
 					return false;
225 225
 				}
@@ -230,7 +230,7 @@ function corePath($path) {
230 230
 			$File =& new File($path . 'webroot' . DS . 'test.php');
231 231
 			$contents = $File->read();
232 232
 			if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) {
233  
-				$result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '".CAKE_CORE_INCLUDE_PATH."');", $contents);
  233
+				$result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '" . CAKE_CORE_INCLUDE_PATH . "');", $contents);
234 234
 				if (!$File->write($result)) {
235 235
 					return false;
236 236
 				}
2  cake/console/libs/tasks/test.php
@@ -181,7 +181,7 @@ function bake($class, $name = null, $cases = array()) {
181 181
 		}
182 182
 
183 183
 		$header = '$Id';
184  
-		$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $name ." Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
  184
+		$content = "<?php \n/* SVN FILE: $header$ */\n/* " . $name . " Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
185 185
 		return $this->createFile($this->filePath . Inflector::underscore($name) . '.test.php', $content);
186 186
 	}
187 187
 /**
6  cake/console/libs/templates/views/form.ctp
@@ -25,7 +25,7 @@
25 25
 <div class="<?php echo $pluralVar;?> form">
26 26
 <?php echo "<?php echo \$form->create('{$modelClass}');?>\n";?>
27 27
 	<fieldset>
28  
- 		<legend><?php echo "<?php __('".Inflector::humanize($action)." {$singularHumanName}');?>";?></legend>
  28
+ 		<legend><?php echo "<?php __('" . Inflector::humanize($action) . " {$singularHumanName}');?>";?></legend>
29 29
 <?php
30 30
 		echo "\t<?php\n";
31 31
 		foreach ($fields as $field) {
@@ -58,8 +58,8 @@
58 58
 		foreach ($associations as $type => $data) {
59 59
 			foreach ($data as $alias => $details) {
60 60
 				if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
61  
-					echo "\t\t<li><?php echo \$html->link(__('List ".Inflector::humanize($details['controller'])."', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
62  
-					echo "\t\t<li><?php echo \$html->link(__('New ".Inflector::humanize(Inflector::underscore($alias))."', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
  61
+					echo "\t\t<li><?php echo \$html->link(__('List " . Inflector::humanize($details['controller']) . "', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
  62
+					echo "\t\t<li><?php echo \$html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
63 63
 					$done[] = $details['controller'];
64 64
 				}
65 65
 			}
2  cake/console/libs/templates/views/home.ctp
... ...
@@ -1,5 +1,5 @@
1 1
 <?php
2  
-$output = "<h2>Sweet, \"".Inflector::humanize($app)."\" got Baked by CakePHP!</h2>\n";
  2
+$output = "<h2>Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!</h2>\n";
3 3
 $output .="
4 4
 <?php
5 5
 if (Configure::read() > 0):
4  cake/console/libs/templates/views/index.ctp
@@ -88,8 +88,8 @@ echo "<?php endforeach; ?>\n";
88 88
 	foreach ($associations as $type => $data) {
89 89
 		foreach ($data as $alias => $details) {
90 90
 			if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
91  
-				echo "\t\t<li><?php echo \$html->link(__('List ".Inflector::humanize($details['controller'])."', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
92  
-				echo "\t\t<li><?php echo \$html->link(__('New ".Inflector::humanize(Inflector::underscore($alias))."', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
  91
+				echo "\t\t<li><?php echo \$html->link(__('List " . Inflector::humanize($details['controller']) . "', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
  92
+				echo "\t\t<li><?php echo \$html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
93 93
 				$done[] = $details['controller'];
94 94
 			}
95 95
 		}
18  cake/console/libs/templates/views/view.ctp
@@ -32,14 +32,14 @@ foreach ($fields as $field) {
32 32
 		foreach ($associations['belongsTo'] as $alias => $details) {
33 33
 			if ($field === $details['foreignKey']) {
34 34
 				$isKey = true;
35  
-				echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('".Inflector::humanize(Inflector::underscore($alias))."'); ?></dt>\n";
  35
+				echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize(Inflector::underscore($alias)) . "'); ?></dt>\n";
36 36
 				echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo \$html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
37 37
 				break;
38 38
 			}
39 39
 		}
40 40
 	}
41 41
 	if ($isKey !== true) {
42  
-		echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('".Inflector::humanize($field)."'); ?></dt>\n";
  42
+		echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize($field) . "'); ?></dt>\n";
43 43
 		echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
44 44
 	}
45 45
 }
@@ -58,8 +58,8 @@ foreach ($fields as $field) {
58 58
 	foreach ($associations as $type => $data) {
59 59
 		foreach ($data as $alias => $details) {
60 60
 			if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
61  
-				echo "\t\t<li><?php echo \$html->link(__('List ".Inflector::humanize($details['controller'])."', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
62  
-				echo "\t\t<li><?php echo \$html->link(__('New ".Inflector::humanize(Inflector::underscore($alias))."', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
  61
+				echo "\t\t<li><?php echo \$html->link(__('List " . Inflector::humanize($details['controller']) . "', true), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
  62
+				echo "\t\t<li><?php echo \$html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "', true), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
63 63
 				$done[] = $details['controller'];
64 64
 			}
65 65
 		}
@@ -71,12 +71,12 @@ foreach ($fields as $field) {
71 71
 if (!empty($associations['hasOne'])) :
72 72
 	foreach ($associations['hasOne'] as $alias => $details): ?>
73 73
 	<div class="related">
74  
-		<h3><?php echo "<?php  __('Related ".Inflector::humanize($details['controller'])."');?>";?></h3>
  74
+		<h3><?php echo "<?php  __('Related " . Inflector::humanize($details['controller']) . "');?>";?></h3>
75 75
 	<?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])):?>\n";?>
76 76
 		<dl><?php echo "\t<?php \$i = 0; \$class = ' class=\"altrow\"';?>\n";?>
77 77
 	<?php
78 78
 			foreach ($details['fields'] as $field) {
79  
-				echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('".Inflector::humanize($field)."');?></dt>\n";
  79
+				echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize($field) . "');?></dt>\n";
80 80
 				echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t<?php echo \${$singularVar}['{$alias}']['{$field}'];?>\n&nbsp;</dd>\n";
81 81
 			}
82 82
 	?>
@@ -84,7 +84,7 @@ if (!empty($associations['hasOne'])) :
84 84
 	<?php echo "<?php endif; ?>\n";?>
85 85
 		<div class="actions">
86 86
 			<ul>
87  
-				<li><?php echo "<?php echo \$html->link(__('Edit ".Inflector::humanize(Inflector::underscore($alias))."', true), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n";?>
  87
+				<li><?php echo "<?php echo \$html->link(__('Edit " . Inflector::humanize(Inflector::underscore($alias)) . "', true), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n";?>
88 88
 			</ul>
89 89
 		</div>
90 90
 	</div>
@@ -110,7 +110,7 @@ foreach ($relations as $alias => $details):
110 110
 	<tr>
111 111
 <?php
112 112
 			foreach ($details['fields'] as $field) {
113  
-				echo "\t\t<th><?php __('".Inflector::humanize($field)."'); ?></th>\n";
  113
+				echo "\t\t<th><?php __('" . Inflector::humanize($field) . "'); ?></th>\n";
114 114
 			}
115 115
 ?>
116 116
 		<th class="actions"><?php echo "<?php __('Actions');?>";?></th>
@@ -143,7 +143,7 @@ echo "\t<?php endforeach; ?>\n";
143 143
 <?php echo "<?php endif; ?>\n\n";?>
144 144
 	<div class="actions">
145 145
 		<ul>
146  
-			<li><?php echo "<?php echo \$html->link(__('New ".Inflector::humanize(Inflector::underscore($alias))."', true), array('controller' => '{$details['controller']}', 'action' => 'add'));?>";?> </li>
  146
+			<li><?php echo "<?php echo \$html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "', true), array('controller' => '{$details['controller']}', 'action' => 'add'));?>";?> </li>
147 147
 		</ul>
148 148
 	</div>
149 149
 </div>
14  cake/libs/controller/components/cookie.php
@@ -203,10 +203,10 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
@@ -214,10 +214,10 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
@@ -278,17 +278,17 @@ function del($key) {
6  cake/libs/http_socket.php
@@ -202,10 +202,10 @@ function request($request = array()) {
202 202
 		}
203 203
 
204 204
 		if (isset($this->request['auth']['user']) && isset($this->request['auth']['pass'])) {
205  
-			$this->request['header']['Authorization'] = $this->request['auth']['method'] ." ". base64_encode($this->request['auth']['user'] .":".$this->request['auth']['pass']);
  205
+			$this->request['header']['Authorization'] = $this->request['auth']['method'] . " " . base64_encode($this->request['auth']['user'] . ":" . $this->request['auth']['pass']);
206 206
 		}
207 207
 		if (isset($this->request['uri']['user']) && isset($this->request['uri']['pass'])) {
208  
-			$this->request['header']['Authorization'] = $this->request['auth']['method'] ." ". base64_encode($this->request['uri']['user'] .":".$this->request['uri']['pass']);
  208
+			$this->request['header']['Authorization'] = $this->request['auth']['method'] . " " . base64_encode($this->request['uri']['user'] . ":" . $this->request['uri']['pass']);
209 209
 		}
210 210
 
211 211
 		if (is_array($this->request['body'])) {
@@ -812,7 +812,7 @@ function parseHeader($header) {
812 812
 			return false;
813 813
 		}
814 814
 
815  
-		preg_match_all("/(.+):(.+)(?:(?<![\t ])".$this->lineBreak."|\$)/Uis", $header, $matches, PREG_SET_ORDER);
  815
+		preg_match_all("/(.+):(.+)(?:(?<![\t ])" . $this->lineBreak . "|\$)/Uis", $header, $matches, PREG_SET_ORDER);
816 816
 
817 817
 		$header = array();
818 818
 		foreach ($matches as $match) {
35  cake/libs/model/datasources/dbo/dbo_mysqli.php
@@ -105,9 +105,8 @@ function disconnect() {
105 105
 	function _execute($sql) {
106 106
 		if (preg_match('/^\s*call/i', $sql)) {
107 107
 			return $this->_executeProcedure($sql);
108  
-		} else {
109  
-			return mysqli_query($this->connection, $sql);
110 108
 		}
  109
+		return mysqli_query($this->connection, $sql);
111 110
 	}
112 111
 /**
113 112
  * Executes given SQL statement (procedure call).
@@ -140,15 +139,15 @@ function listSources() {
140 139
 
141 140
 		if (!$result) {
142 141
 			return array();
143  
-		} else {
144  
-			$tables = array();
  142
+		}
145 143
 
146  
-			while ($line = mysqli_fetch_array($result)) {
147  
-				$tables[] = $line[0];
148  
-			}
149  
-			parent::listSources($tables);
150  
-			return $tables;
  144
+		$tables = array();
  145
+
  146
+		while ($line = mysqli_fetch_array($result)) {
  147
+			$tables[] = $line[0];
151 148
 		}
  149
+		parent::listSources($tables);
  150
+		return $tables;
152 151
 	}
153 152
 /**
154 153
  * Returns an array of the fields in given table name.
@@ -201,14 +200,15 @@ function value($data, $column = null, $safe = false) {
201 200
 		if ($parent != null) {
202 201
 			return $parent;
203 202
 		}
204  
-
205  
-		if ($data === null) {
  203
+		if ($data === null || (is_array($data) && empty($data))) {
206 204
 			return 'NULL';
207 205
 		}
208  
-
209 206
 		if ($data === '' && $column !== 'integer' && $column !== 'float' && $column !== 'boolean') {
210 207
 			return  "''";
211 208
 		}
  209
+		if (empty($column)) {
  210
+			$column = $this->introspectType($data);
  211
+		}
212 212
 
213 213
 		switch ($column) {
214 214
 			case 'boolean':
@@ -217,9 +217,6 @@ function value($data, $column = null, $safe = false) {
217 217
 			case 'integer' :
218 218
 			case 'float' :
219 219
 			case null :
220  
-				if ($data === '') {
221  
-					return 'NULL';
222  
-				}
223 220
 				if ((is_int($data) || is_float($data) || $data === '0') || (
224 221
 					is_numeric($data) && strpos($data, ',') === false &&
225 222
 					$data[0] != '0' && strpos($data, 'e') === false)) {
@@ -278,7 +275,6 @@ function lastInsertId($source = null) {
278 275
 		if ($id !== false && !empty($id) && !empty($id[0]) && isset($id[0]['insertID'])) {
279 276
 			return $id[0]['insertID'];
280 277
 		}
281  
-
282 278
 		return null;
283 279
 	}
284 280
 /**
@@ -337,11 +333,11 @@ function column($real) {
337 333
 	function length($real) {
338 334
 		$col = str_replace(array(')', 'unsigned'), '', $real);
339 335
 		$limit = null;
340  
-
  336
+	
341 337
 		if (strpos($col, '(') !== false) {
342 338
 			list($col, $limit) = explode('(', $col);
343 339
 		}
344  
-
  340
+	
345 341
 		if ($limit != null) {
346 342
 			return intval($limit);
347 343
 		}
@@ -389,9 +385,8 @@ function fetchResult() {
389 385
 				$i++;
390 386
 			}
391 387
 			return $resultRow;
392  
-		} else {
393  
-			return false;
394 388
 		}
  389
+		return false;
395 390
 	}
396 391
 /**
397 392
  * Gets the database encoding
4  cake/libs/model/schema.php
@@ -338,7 +338,7 @@ function write($object, $options = array()) {
338 338
 							$col = "\t\t'indexes' => array(";
339 339
 							$props = array();
340 340
 							foreach ((array)$value as $key => $index) {
341  
-								$props[] = "'{$key}' => array(".join(', ',  $this->__values($index)).")";
  341
+								$props[] = "'{$key}' => array(" . join(', ',  $this->__values($index)) . ")";
342 342
 							}
343 343
 							$col .= join(', ', $props);
344 344
 						}
@@ -446,7 +446,7 @@ function __values($values) {
446 446
 		if (is_array($values)) {
447 447
 			foreach ($values as $key => $val) {
448 448
 				if (is_array($val)) {
449  
-					$vals[] = "'{$key}' => array('".join("', '",  $val)."')";
  449
+					$vals[] = "'{$key}' => array('" . join("', '",  $val) . "')";
450 450
 				} else if (!is_numeric($key)) {
451 451
 					$val = var_export($val, true);
452 452
 					$vals[] = "'{$key}' => {$val}";
6  cake/libs/view/errors/missing_action.ctp
@@ -25,11 +25,11 @@
25 25
 <h2><?php echo sprintf(__('Missing Method in %s', true), $controller);?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error') ?>: </strong>
28  
-	<?php echo sprintf(__('The action %1$s is not defined in controller %2$s', true), "<em>".$action."</em>", "<em>".$controller."</em>");?>
  28
+	<?php echo sprintf(__('The action %1$s is not defined in controller %2$s', true), "<em>" . $action . "</em>", "<em>" . $controller . "</em>");?>
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error') ?>: </strong>
32  
-	<?php echo sprintf(__('Create %1$s%2$s in file: %3$s.', true), "<em>".$controller."::</em>", "<em>".$action."()</em>", APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php");?>
  32
+	<?php echo sprintf(__('Create %1$s%2$s in file: %3$s.', true), "<em>" . $controller . "::</em>", "<em>" . $action . "()</em>", APP_DIR . DS . "controllers" . DS . Inflector::underscore($controller) . ".php");?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -47,5 +47,5 @@ class <?php echo $controller;?> extends AppController {
47 47
 </pre>
48 48
 <p class="notice">
49 49
 	<strong><?php __('Notice') ?>: </strong>
50  
-	<?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR.DS."views".DS."errors".DS."missing_action.ctp");?>
  50
+	<?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_action.ctp");?>
51 51
 </p>
6  cake/libs/view/errors/missing_component_class.ctp
@@ -25,11 +25,11 @@
25 25
 <h2><?php __('Missing Component Class'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__('Component class %1$s in %2$s was not found.', true), "<em>". $component ."Component</em>", "<em>". $controller ."Controller</em>");?>
  28
+	<?php echo sprintf(__('Component class %1$s in %2$s was not found.', true), "<em>" . $component . "Component</em>", "<em>" . $controller . "Controller</em>");?>
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>". $component ."Component</em>", APP_DIR.DS."controllers".DS."components".DS.$file);?>
  32
+	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $component . "Component</em>", APP_DIR . DS . "controllers" . DS . "components" . DS . $file);?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -40,5 +40,5 @@ class <?php echo $component;?>Component extends Object {<br />
40 40
 </pre>
41 41
 <p class="notice">
42 42
 	<strong><?php __('Notice'); ?>: </strong>
43  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_component_class.ctp");?>
  43
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_component_class.ctp");?>
44 44
 </p>
4  cake/libs/view/errors/missing_component_file.ctp
@@ -29,7 +29,7 @@
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>". $component ."Component</em>", APP_DIR.DS."controllers".DS."components".DS.$file);?>
  32
+	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $component . "Component</em>", APP_DIR . DS . "controllers" . DS . "components" . DS . $file);?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -40,5 +40,5 @@ class <?php echo $component;?>Component extends Object {<br />
40 40
 </pre>
41 41
 <p class="notice">
42 42
 	<strong><?php __('Notice'); ?>: </strong>
43  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_component_file.ctp");?>
  43
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_component_file.ctp");?>
44 44
 </p>
6  cake/libs/view/errors/missing_controller.ctp
@@ -25,11 +25,11 @@
25 25
 <h2><?php __('Missing Controller'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__('%s could not be found.', true), "<em>".$controller."</em>");?>
  28
+	<?php echo sprintf(__('%s could not be found.', true), "<em>" . $controller . "</em>");?>
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class %s below in file: %s', true), "<em>".$controller."</em>", APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php");?>
  32
+	<?php echo sprintf(__('Create the class %s below in file: %s', true), "<em>" . $controller . "</em>", APP_DIR . DS . "controllers" . DS . Inflector::underscore($controller) . ".php");?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -41,5 +41,5 @@ class <?php echo $controller;?> extends AppController {
41 41
 </pre>
42 42
 <p class="notice">
43 43
 	<strong><?php __('Notice'); ?>: </strong>
44  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_controller.ctp");?>
  44
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_controller.ctp");?>
45 45
 </p>
4  cake/libs/view/errors/missing_helper_class.ctp
@@ -29,7 +29,7 @@
29 29
 </p>
30 30
 <p  class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR.DS."views".DS."helpers".DS.$file);?>
  32
+	<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -40,5 +40,5 @@ class <?php echo $helperClass;?> extends AppHelper {
40 40
 </pre>
41 41
 <p class="notice">
42 42
 	<strong><?php __('Notice'); ?>: </strong>
43  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_helper_class.ctp");?>
  43
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_helper_class.ctp");?>
44 44
 </p>
6  cake/libs/view/errors/missing_helper_file.ctp
@@ -25,11 +25,11 @@
25 25
 <h2><?php __('Missing Helper File'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__("The helper file %s can not be found or does not exist.", true), APP_DIR.DS."views".DS."helpers".DS.$file);?>
  28
+	<?php echo sprintf(__("The helper file %s can not be found or does not exist.", true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?>
29 29
 </p>
30 30
 <p  class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR.DS."views".DS."helpers".DS.$file);?>
  32
+	<?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -40,5 +40,5 @@ class <?php echo $helperClass;?> extends AppHelper {
40 40
 </pre>
41 41
 <p class="notice">
42 42
 	<strong><?php __('Notice'); ?>: </strong>
43  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_helper_file.ctp");?>
  43
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_helper_file.ctp");?>
44 44
 </p>
6  cake/libs/view/errors/missing_layout.ctp
@@ -25,13 +25,13 @@
25 25
 <h2><?php __('Missing Layout'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__("The layout file %s can not be found or does not exist.", true), "<em>". $file ."</em>");?>
  28
+	<?php echo sprintf(__("The layout file %s can not be found or does not exist.", true), "<em>" . $file . "</em>");?>
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Confirm you have created the file: %s', true), "<em>". $file ."</em>");?>
  32
+	<?php echo sprintf(__('Confirm you have created the file: %s', true), "<em>" . $file . "</em>");?>
33 33
 </p>
34 34
 <p class="notice">
35 35
 	<strong><?php __('Notice'); ?>: </strong>
36  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_layout.ctp");?>
  36
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_layout.ctp");?>
37 37
 </p>
4  cake/libs/view/errors/missing_model.ctp
@@ -29,7 +29,7 @@
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>". $model . "</em>", APP_DIR.DS."models".DS.Inflector::underscore($model).".php");?>
  32
+	<?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $model . "</em>", APP_DIR . DS . "models" . DS . Inflector::underscore($model) . ".php");?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
@@ -42,5 +42,5 @@ class <?php echo $model;?> extends AppModel {
42 42
 </pre>
43 43
 <p class="notice">
44 44
 	<strong><?php __('Notice'); ?>: </strong>
45  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_model.ctp");?>
  45
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_model.ctp");?>
46 46
 </p>
4  cake/libs/view/errors/missing_scaffolddb.ctp
@@ -29,9 +29,9 @@
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
32  
-	<?php echo sprintf(__('Confirm you have created the file: %s', true), APP_DIR.DS."config".DS."database.php");?>
  32
+	<?php echo sprintf(__('Confirm you have created the file: %s', true), APP_DIR . DS . "config" . DS . "database.php");?>
33 33
 </p>
34 34
 <p class="notice">
35 35
 	<strong><?php __('Notice'); ?>: </strong>
36  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_scaffolddb.ctp");?>
  36
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_scaffolddb.ctp");?>
37 37
 </p>
4  cake/libs/view/errors/missing_table.ctp
@@ -25,9 +25,9 @@
25 25
 <h2><?php __('Missing Database Table'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__('Database table %1$s for model %2$s was not found.', true),"<em>". $table ."</em>",  "<em>". $model ."</em>");?>
  28
+	<?php echo sprintf(__('Database table %1$s for model %2$s was not found.', true),"<em>" . $table . "</em>",  "<em>" . $model . "</em>");?>
29 29
 </p>
30 30
 <p class="notice">
31 31
 	<strong><?php __('Notice'); ?>: </strong>
32  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_table.ctp");?>
  32
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_table.ctp");?>
33 33
 </p>
4  cake/libs/view/errors/missing_view.ctp
@@ -25,7 +25,7 @@
25 25
 <h2><?php __('Missing View'); ?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__('The view for %1$s%2$s was not found.', true), "<em>". $controller."Controller::</em>", "<em>". $action ."()</em>");?>
  28
+	<?php echo sprintf(__('The view for %1$s%2$s was not found.', true), "<em>" . $controller . "Controller::</em>", "<em>". $action . "()</em>");?>
29 29
 </p>
30 30
 <p class="error">
31 31
 	<strong><?php __('Error'); ?>: </strong>
@@ -33,5 +33,5 @@
33 33
 </p>
34 34
 <p class="notice">
35 35
 	<strong><?php __('Notice'); ?>: </strong>
36  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."missing_view.ctp");?>
  36
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_view.ctp");?>
37 37
 </p>
4  cake/libs/view/errors/private_action.ctp
@@ -25,9 +25,9 @@
25 25
 <h2><?php echo sprintf(__('Private Method in %s', true), $controller);?></h2>
26 26
 <p class="error">
27 27
 	<strong><?php __('Error'); ?>: </strong>
28  
-	<?php echo sprintf(__("%s%s cannot be accessed directly.", true), "<em>". $controller ."::</em>",  "<em>". $action ."()</em>");?>
  28
+	<?php echo sprintf(__("%s%s cannot be accessed directly.", true), "<em>" . $controller . "::</em>",  "<em>" . $action . "()</em>");?>
29 29
 </p>
30 30
 <p class="notice">
31 31
 	<strong><?php __('Notice'); ?>: </strong>
32  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."private_action.ctp");?>
  32
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "private_action.ctp");?>
33 33
 </p>
2  cake/libs/view/errors/scaffold_error.ctp
@@ -29,7 +29,7 @@
29 29
 </p>
30 30
 <p class="notice">
31 31
 	<strong><?php __('Notice'); ?>: </strong>
32  
-	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR.DS."views".DS."errors".DS."scaffold_error.ctp");?>
  32
+	<?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "scaffold_error.ctp");?>
33 33
 </p>
34 34
 <pre>
35 35
 &lt;?php
4  cake/libs/view/scaffolds/edit.ctp
@@ -40,8 +40,8 @@
40 40
 		foreach ($associations as $_type => $_data) {
41 41
 			foreach ($_data as $_alias => $_details) {
42 42
 				if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
43  
-					echo "\t\t<li>".$html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index'))."</li>\n";
44  
-					echo "\t\t<li>".$html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add'))."</li>\n";
  43
+					echo "\t\t<li>" . $html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "</li>\n";
  44
+					echo "\t\t<li>" . $html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "</li>\n";
45 45
 					$done[] = $_details['controller'];
46 46
 				}
47 47
 			}
4  cake/libs/view/scaffolds/index.ctp
@@ -86,8 +86,8 @@ echo "\n";
86 86
 		foreach ($associations as $_type => $_data) {
87 87
 			foreach ($_data as $_alias => $_details) {
88 88
 				if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
89  
-					echo "\t\t<li>".$html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index'))."</li>\n";
90  
-					echo "\t\t<li>".$html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add'))."</li>\n";
  89
+					echo "\t\t<li>" . $html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
  90
+					echo "\t\t<li>" . $html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
91 91
 					$done[] = $_details['controller'];
92 92
 				}
93 93
 			}
16  cake/libs/view/scaffolds/view.ctp
@@ -37,14 +37,14 @@ foreach ($scaffoldFields as $_field) {
37 37
 		foreach ($associations['belongsTo'] as $_alias => $_details) {
38 38
 			if ($_field === $_details['foreignKey']) {
39 39
 				$isKey = true;
40  
-				echo "\t\t<dt{$class}>".Inflector::humanize($_alias)."</dt>\n";
  40
+				echo "\t\t<dt{$class}>" . Inflector::humanize($_alias) . "</dt>\n";
41 41
 				echo "\t\t<dd{$class}>\n\t\t\t" . $html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "\n\t\t&nbsp;</dd>\n";
42 42
 				break;
43 43
 			}
44 44
 		}
45 45
 	}
46 46
 	if ($isKey !== true) {
47  
-		echo "\t\t<dt{$class}>".Inflector::humanize($_field)."</dt>\n";
  47
+		echo "\t\t<dt{$class}>" . Inflector::humanize($_field) . "</dt>\n";
48 48
 		echo "\t\t<dd{$class}>\n\t\t\t{${$singularVar}[$modelClass][$_field]}\n&nbsp;\t\t</dd>\n";
49 49
 	}
50 50
 }
@@ -63,8 +63,8 @@ foreach ($scaffoldFields as $_field) {
63 63
 	foreach ($associations as $_type => $_data) {
64 64
 		foreach ($_data as $_alias => $_details) {
65 65
 			if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
66  
-				echo "\t\t<li>".$html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index'))."</li>\n";
67  
-				echo "\t\t<li>".$html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add'))."</li>\n";
  66
+				echo "\t\t<li>" . $html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
  67
+				echo "\t\t<li>" . $html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
68 68
 				$done[] = $_details['controller'];
69 69
 			}
70 70
 		}
@@ -87,8 +87,8 @@ foreach ($associations['hasOne'] as $_alias => $_details): ?>
87 87
 			if ($i++ % 2 == 0) {
88 88
 				$class = ' class="altrow"';
89 89
 			}
90  
-			echo "\t\t<dt{$class}>".Inflector::humanize($_field)."</dt>\n";
91  
-			echo "\t\t<dd{$class}>\n\t" .${$singularVar}[$_alias][$_field] ."\n&nbsp;</dd>\n";
  90
+			echo "\t\t<dt{$class}>" . Inflector::humanize($_field) . "</dt>\n";
  91
+			echo "\t\t<dd{$class}>\n\t" . ${$singularVar}[$_alias][$_field] . "\n&nbsp;</dd>\n";
92 92
 		}
93 93
 ?>
94 94
 	</dl>
@@ -122,7 +122,7 @@ $otherSingularVar = Inflector::variable($_alias);
122 122
 <?php
123 123
 		$otherFields = array_keys(${$singularVar}[$_alias][0]);
124 124
 		foreach ($otherFields as $_field) {
125  
-			echo "\t\t<th>".Inflector::humanize($_field)."</th>\n";
  125
+			echo "\t\t<th>" . Inflector::humanize($_field) . "</th>\n";
126 126
 		}
127 127
 ?>
128 128
 		<th class="actions">Actions</th>
@@ -137,7 +137,7 @@ $otherSingularVar = Inflector::variable($_alias);
137 137
 		echo "\t\t<tr{$class}>\n";
138 138
 
139 139
 			foreach ($otherFields as $_field) {
140  
-				echo "\t\t\t<td>".${$otherSingularVar}[$_field]."</td>\n";
  140
+				echo "\t\t\t<td>" . ${$otherSingularVar}[$_field] . "</td>\n";
141 141
 			}
142 142
 
143 143
 			echo "\t\t\t<td class=\"actions\">\n";
4  cake/tests/cases/libs/http_socket.test.php
@@ -399,12 +399,12 @@ function testRequest() {
399 399
 		$this->Socket->setReturnValue('read', false);
400 400
 		$this->Socket->_mock->_call_counts['read'] = 0;
401 401
 		$number = mt_rand(0, 9999999);
402  
-		$serverResponse = "HTTP/1.x 200 OK\r\nDate: Mon, 16 Apr 2007 04:14:16 GMT\r\nServer: CakeHttp Server\r\nContent-Type: text/html\r\n\r\n<h1>Hello, your lucky number is ".$number."</h1>";
  402
+		$serverResponse = "HTTP/1.x 200 OK\r\nDate: Mon, 16 Apr 2007 04:14:16 GMT\r\nServer: CakeHttp Server\r\nContent-Type: text/html\r\n\r\n<h1>Hello, your lucky number is " . $number . "</h1>";
403 403
 		$this->Socket->setReturnValueAt(0, 'read', $serverResponse);
404 404
 		$this->Socket->expect('write', array("GET / HTTP/1.1\r\nHost: www.cakephp.org\r\nConnection: close\r\nUser-Agent: CakePHP\r\n\r\n"));
405 405
 		$this->Socket->expectCallCount('read', 2);
406 406
 		$response = $this->Socket->request($request);
407  
-		$this->assertIdentical($response, "<h1>Hello, your lucky number is ".$number."</h1>");
  407
+		$this->assertIdentical($response, "<h1>Hello, your lucky number is " . $number . "</h1>");
408 408
 
409 409
 		$this->Socket->reset();
410 410
 		$serverResponse = "HTTP/1.x 200 OK\r\nSet-Cookie: foo=bar\r\nDate: Mon, 16 Apr 2007 04:14:16 GMT\r\nServer: CakeHttp Server\r\nContent-Type: text/html\r\n\r\n<h1>This is a cookie test!</h1>";
4  cake/tests/cases/libs/sanitize.test.php
@@ -298,8 +298,8 @@ function testStripScripts() {
298 298
 		$result = Sanitize::stripScripts($string);
299 299
 		$this->assertEqual($result, $expected);
300 300
 
301  
-		$string = '<link href="/css/styles.css" media="screen" rel="stylesheet" />'."\n".'<link rel="icon" href="/favicon.ico" type="image/x-icon" />'."\n".'<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />'."\n".'<link rel="alternate" href="/feed.xml" title="RSS Feed" type="application/rss+xml" />';
302  
-		$expected = "\n".'<link rel="icon" href="/favicon.ico" type="image/x-icon" />'."\n".'<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />'."\n".'<link rel="alternate" href="/feed.xml" title="RSS Feed" type="application/rss+xml" />';
  301
+		$string = '<link href="/css/styles.css" media="screen" rel="stylesheet" />' . "\n" . '<link rel="icon" href="/favicon.ico" type="image/x-icon" />' . "\n" . '<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />' . "\n" . '<link rel="alternate" href="/feed.xml" title="RSS Feed" type="application/rss+xml" />';
  302
+		$expected = "\n" . '<link rel="icon" href="/favicon.ico" type="image/x-icon" />' . "\n" . '<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />'."\n".'<link rel="alternate" href="/feed.xml" title="RSS Feed" type="application/rss+xml" />';
303 303
 		$result = Sanitize::stripScripts($string);
304 304
 		$this->assertEqual($result, $expected);
305 305
 

0 notes on commit f88cc56

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