Skip to content
This repository
Browse code

Fix coding standard issues in Error/

  • Loading branch information...
commit 60989ad6c8a576e400b930fb000b5fb2fe06e80e 1 parent 63c992a
Mark Story authored March 03, 2012
1  lib/Cake/Error/ErrorHandler.php
@@ -224,4 +224,5 @@ public static function mapErrorCode($code) {
224 224
 		}
225 225
 		return array($error, $log);
226 226
 	}
  227
+
227 228
 }
3  lib/Cake/Error/ExceptionRenderer.php
@@ -203,7 +203,7 @@ public function error400($error) {
203 203
 		$this->controller->set(array(
204 204
 			'name' => $message,
205 205
 			'url' => h($url),
206  
-			'error' => $error, 
  206
+			'error' => $error,
207 207
 			'_serialize' => array('name', 'url')
208 208
 		));
209 209
 		$this->_outputMessage('error400');
@@ -286,4 +286,5 @@ protected function _outputMessageSafe($template) {
286 286
 		$this->controller->response->type('html');
287 287
 		$this->controller->response->send();
288 288
 	}
  289
+
289 290
 }
82  lib/Cake/Error/exceptions.php
@@ -26,7 +26,8 @@
26 26
  * @package       Cake.Error
27 27
  */
28 28
 if (!class_exists('HttpException')) {
29  
-	class HttpException extends RuntimeException { }
  29
+	class HttpException extends RuntimeException {
  30
+	}
30 31
 }
31 32
 
32 33
 /**
@@ -35,6 +36,7 @@ class HttpException extends RuntimeException { }
35 36
  * @package       Cake.Error
36 37
  */
37 38
 class BadRequestException extends HttpException {
  39
+
38 40
 /**
39 41
  * Constructor
40 42
  *
@@ -47,6 +49,7 @@ public function __construct($message = null, $code = 400) {
47 49
 		}
48 50
 		parent::__construct($message, $code);
49 51
 	}
  52
+
50 53
 }
51 54
 
52 55
 /**
@@ -55,6 +58,7 @@ public function __construct($message = null, $code = 400) {
55 58
  * @package       Cake.Error
56 59
  */
57 60
 class UnauthorizedException extends HttpException {
  61
+
58 62
 /**
59 63
  * Constructor
60 64
  *
@@ -67,6 +71,7 @@ public function __construct($message = null, $code = 401) {
67 71
 		}
68 72
 		parent::__construct($message, $code);
69 73
 	}
  74
+
70 75
 }
71 76
 
72 77
 /**
@@ -75,6 +80,7 @@ public function __construct($message = null, $code = 401) {
75 80
  * @package       Cake.Error
76 81
  */
77 82
 class ForbiddenException extends HttpException {
  83
+
78 84
 /**
79 85
  * Constructor
80 86
  *
@@ -87,6 +93,7 @@ public function __construct($message = null, $code = 403) {
87 93
 		}
88 94
 		parent::__construct($message, $code);
89 95
 	}
  96
+
90 97
 }
91 98
 
92 99
 /**
@@ -95,6 +102,7 @@ public function __construct($message = null, $code = 403) {
95 102
  * @package       Cake.Error
96 103
  */
97 104
 class NotFoundException extends HttpException {
  105
+
98 106
 /**
99 107
  * Constructor
100 108
  *
@@ -107,6 +115,7 @@ public function __construct($message = null, $code = 404) {
107 115
 		}
108 116
 		parent::__construct($message, $code);
109 117
 	}
  118
+
110 119
 }
111 120
 
112 121
 /**
@@ -115,6 +124,7 @@ public function __construct($message = null, $code = 404) {
115 124
  * @package       Cake.Error
116 125
  */
117 126
 class MethodNotAllowedException extends HttpException {
  127
+
118 128
 /**
119 129
  * Constructor
120 130
  *
@@ -127,6 +137,7 @@ public function __construct($message = null, $code = 405) {
127 137
 		}
128 138
 		parent::__construct($message, $code);
129 139
 	}
  140
+
130 141
 }
131 142
 
132 143
 /**
@@ -135,6 +146,7 @@ public function __construct($message = null, $code = 405) {
135 146
  * @package       Cake.Error
136 147
  */
137 148
 class InternalErrorException extends HttpException {
  149
+
138 150
 /**
139 151
  * Constructor
140 152
  *
@@ -147,6 +159,7 @@ public function __construct($message = null, $code = 500) {
147 159
 		}
148 160
 		parent::__construct($message, $code);
149 161
 	}
  162
+
150 163
 }
151 164
 
152 165
 /**
@@ -156,6 +169,7 @@ public function __construct($message = null, $code = 500) {
156 169
  * @package       Cake.Error
157 170
  */
158 171
 class CakeException extends RuntimeException {
  172
+
159 173
 /**
160 174
  * Array of attributes that are passed in from the constructor, and
161 175
  * made available in the view when a development error is displayed.
@@ -197,6 +211,7 @@ public function __construct($message, $code = 500) {
197 211
 	public function getAttributes() {
198 212
 		return $this->_attributes;
199 213
 	}
  214
+
200 215
 }
201 216
 
202 217
 /**
@@ -206,11 +221,13 @@ public function getAttributes() {
206 221
  * @package       Cake.Error
207 222
  */
208 223
 class MissingControllerException extends CakeException {
  224
+
209 225
 	protected $_messageTemplate = 'Controller class %s could not be found.';
210 226
 
211 227
 	public function __construct($message, $code = 404) {
212 228
 		parent::__construct($message, $code);
213 229
 	}
  230
+
214 231
 }
215 232
 
216 233
 /**
@@ -220,11 +237,13 @@ public function __construct($message, $code = 404) {
220 237
  * @package       Cake.Error
221 238
  */
222 239
 class MissingActionException extends CakeException {
  240
+
223 241
 	protected $_messageTemplate = 'Action %s::%s() could not be found.';
224 242
 
225 243
 	public function __construct($message, $code = 404) {
226 244
 		parent::__construct($message, $code);
227 245
 	}
  246
+
228 247
 }
229 248
 
230 249
 /**
@@ -234,11 +253,13 @@ public function __construct($message, $code = 404) {
234 253
  * @package       Cake.Error
235 254
  */
236 255
 class PrivateActionException extends CakeException {
  256
+
237 257
 	protected $_messageTemplate = 'Private Action %s::%s() is not directly accessible.';
238 258
 
239 259
 	public function __construct($message, $code = 404, Exception $previous = null) {
240 260
 		parent::__construct($message, $code, $previous);
241 261
 	}
  262
+
242 263
 }
243 264
 
244 265
 /**
@@ -247,7 +268,9 @@ public function __construct($message, $code = 404, Exception $previous = null) {
247 268
  * @package       Cake.Error
248 269
  */
249 270
 class MissingComponentException extends CakeException {
  271
+
250 272
 	protected $_messageTemplate = 'Component class %s could not be found.';
  273
+
251 274
 }
252 275
 
253 276
 /**
@@ -256,7 +279,9 @@ class MissingComponentException extends CakeException {
256 279
  * @package       Cake.Error
257 280
  */
258 281
 class MissingBehaviorException extends CakeException {
  282
+
259 283
 	protected $_messageTemplate = 'Behavior class %s could not be found.';
  284
+
260 285
 }
261 286
 
262 287
 /**
@@ -265,7 +290,9 @@ class MissingBehaviorException extends CakeException {
265 290
  * @package       Cake.Error
266 291
  */
267 292
 class MissingViewException extends CakeException {
  293
+
268 294
 	protected $_messageTemplate = 'View file "%s" is missing.';
  295
+
269 296
 }
270 297
 
271 298
 /**
@@ -274,7 +301,9 @@ class MissingViewException extends CakeException {
274 301
  * @package       Cake.Error
275 302
  */
276 303
 class MissingLayoutException extends CakeException {
  304
+
277 305
 	protected $_messageTemplate = 'Layout file "%s" is missing.';
  306
+
278 307
 }
279 308
 
280 309
 /**
@@ -283,7 +312,9 @@ class MissingLayoutException extends CakeException {
283 312
  * @package       Cake.Error
284 313
  */
285 314
 class MissingHelperException extends CakeException {
  315
+
286 316
 	protected $_messageTemplate = 'Helper class %s could not be found.';
  317
+
287 318
 }
288 319
 
289 320
 /**
@@ -292,7 +323,9 @@ class MissingHelperException extends CakeException {
292 323
  * @package       Cake.Error
293 324
  */
294 325
 class MissingDatabaseException extends CakeException {
  326
+
295 327
 	protected $_messageTemplate = 'Database connection "%s" could not be found.';
  328
+
296 329
 }
297 330
 
298 331
 /**
@@ -301,7 +334,9 @@ class MissingDatabaseException extends CakeException {
301 334
  * @package       Cake.Error
302 335
  */
303 336
 class MissingConnectionException extends CakeException {
  337
+
304 338
 	protected $_messageTemplate = 'Database connection "%s" is missing, or could not be created.';
  339
+
305 340
 }
306 341
 
307 342
 /**
@@ -310,7 +345,9 @@ class MissingConnectionException extends CakeException {
310 345
  * @package       Cake.Error
311 346
  */
312 347
 class MissingTaskException extends CakeException {
  348
+
313 349
 	protected $_messageTemplate = 'Task class %s could not be found.';
  350
+
314 351
 }
315 352
 
316 353
 /**
@@ -319,7 +356,9 @@ class MissingTaskException extends CakeException {
319 356
  * @package       Cake.Error
320 357
  */
321 358
 class MissingShellMethodException extends CakeException {
  359
+
322 360
 	protected $_messageTemplate = "Unknown command %1\$s %2\$s.\nFor usage try `cake %1\$s --help`";
  361
+
323 362
 }
324 363
 
325 364
 /**
@@ -328,7 +367,9 @@ class MissingShellMethodException extends CakeException {
328 367
  * @package       Cake.Error
329 368
  */
330 369
 class MissingShellException extends CakeException {
  370
+
331 371
 	protected $_messageTemplate = 'Shell class %s could not be found.';
  372
+
332 373
 }
333 374
 
334 375
 /**
@@ -337,7 +378,9 @@ class MissingShellException extends CakeException {
337 378
  * @package       Cake.Error
338 379
  */
339 380
 class MissingDatasourceConfigException extends CakeException {
  381
+
340 382
 	protected $_messageTemplate = 'The datasource configuration "%s" was not found in database.php';
  383
+
341 384
 }
342 385
 
343 386
 /**
@@ -346,7 +389,9 @@ class MissingDatasourceConfigException extends CakeException {
346 389
  * @package       Cake.Error
347 390
  */
348 391
 class MissingDatasourceException extends CakeException {
  392
+
349 393
 	protected $_messageTemplate = 'Datasource class %s could not be found.';
  394
+
350 395
 }
351 396
 
352 397
 /**
@@ -355,7 +400,9 @@ class MissingDatasourceException extends CakeException {
355 400
  * @package       Cake.Error
356 401
  */
357 402
 class MissingTableException extends CakeException {
  403
+
358 404
 	protected $_messageTemplate = 'Table %s for model %s was not found in datasource %s.';
  405
+
359 406
 }
360 407
 
361 408
 /**
@@ -364,7 +411,9 @@ class MissingTableException extends CakeException {
364 411
  * @package       Cake.Error
365 412
  */
366 413
 class MissingModelException extends CakeException {
  414
+
367 415
 	protected $_messageTemplate = 'Model %s could not be found.';
  416
+
368 417
 }
369 418
 
370 419
 /**
@@ -373,7 +422,9 @@ class MissingModelException extends CakeException {
373 422
  * @package       Cake.Error
374 423
  */
375 424
 class MissingTestLoaderException extends CakeException {
  425
+
376 426
 	protected $_messageTemplate = 'Test loader %s could not be found.';
  427
+
377 428
 }
378 429
 
379 430
 /**
@@ -382,7 +433,9 @@ class MissingTestLoaderException extends CakeException {
382 433
  * @package       Cake.Error
383 434
  */
384 435
 class MissingPluginException extends CakeException {
  436
+
385 437
 	protected $_messageTemplate = 'Plugin %s could not be found.';
  438
+
386 439
 }
387 440
 
388 441
 /**
@@ -390,7 +443,8 @@ class MissingPluginException extends CakeException {
390 443
  *
391 444
  * @package       Cake.Error
392 445
  */
393  
-class AclException extends CakeException { }
  446
+class AclException extends CakeException {
  447
+}
394 448
 
395 449
 /**
396 450
  * Exception class for Cache.  This exception will be thrown from Cache when it
@@ -398,7 +452,8 @@ class AclException extends CakeException { }
398 452
  *
399 453
  * @package       Cake.Error
400 454
  */
401  
-class CacheException extends CakeException { }
  455
+class CacheException extends CakeException {
  456
+}
402 457
 
403 458
 /**
404 459
  * Exception class for Router.  This exception will be thrown from Router when it
@@ -406,7 +461,8 @@ class CacheException extends CakeException { }
406 461
  *
407 462
  * @package       Cake.Error
408 463
  */
409  
-class RouterException extends CakeException { }
  464
+class RouterException extends CakeException {
  465
+}
410 466
 
411 467
 /**
412 468
  * Exception class for CakeLog.  This exception will be thrown from CakeLog when it
@@ -414,7 +470,8 @@ class RouterException extends CakeException { }
414 470
  *
415 471
  * @package       Cake.Error
416 472
  */
417  
-class CakeLogException extends CakeException { }
  473
+class CakeLogException extends CakeException {
  474
+}
418 475
 
419 476
 /**
420 477
  * Exception class for CakeSession.  This exception will be thrown from CakeSession when it
@@ -422,7 +479,8 @@ class CakeLogException extends CakeException { }
422 479
  *
423 480
  * @package       Cake.Error
424 481
  */
425  
-class CakeSessionException extends CakeException { }
  482
+class CakeSessionException extends CakeException {
  483
+}
426 484
 
427 485
 /**
428 486
  * Exception class for Configure.  This exception will be thrown from Configure when it
@@ -430,7 +488,8 @@ class CakeSessionException extends CakeException { }
430 488
  *
431 489
  * @package       Cake.Error
432 490
  */
433  
-class ConfigureException extends CakeException { }
  491
+class ConfigureException extends CakeException {
  492
+}
434 493
 
435 494
 /**
436 495
  * Exception class for Socket. This exception will be thrown from CakeSocket, CakeEmail, HttpSocket
@@ -438,7 +497,8 @@ class ConfigureException extends CakeException { }
438 497
  *
439 498
  * @package       Cake.Error
440 499
  */
441  
-class SocketException extends CakeException { }
  500
+class SocketException extends CakeException {
  501
+}
442 502
 
443 503
 /**
444 504
  * Exception class for Xml.  This exception will be thrown from Xml when it
@@ -446,7 +506,8 @@ class SocketException extends CakeException { }
446 506
  *
447 507
  * @package       Cake.Error
448 508
  */
449  
-class XmlException extends CakeException { }
  509
+class XmlException extends CakeException {
  510
+}
450 511
 
451 512
 /**
452 513
  * Exception class for Console libraries.  This exception will be thrown from Console library
@@ -454,4 +515,5 @@ class XmlException extends CakeException { }
454 515
  *
455 516
  * @package       Cake.Error
456 517
  */
457  
-class ConsoleException extends CakeException { }
  518
+class ConsoleException extends CakeException {
  519
+}

0 notes on commit 60989ad

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