Permalink
Browse files

Merge pull request #360 from shama/patch-code-formatting

Code consistency formatting tweaks
  • Loading branch information...
2 parents be770bd + 1e1c7a0 commit dfced8b222d07dc507520559f51ba61d4bca2c73 @lorenzo lorenzo committed Dec 7, 2011
Showing with 127 additions and 12 deletions.
  1. +1 −0 app/Config/core.php
  2. +2 −0 lib/Cake/Cache/Cache.php
  3. +1 −0 lib/Cake/Cache/Engine/XcacheEngine.php
  4. +1 −0 lib/Cake/Console/Command/ApiShell.php
  5. +1 −0 lib/Cake/Console/Command/UpgradeShell.php
  6. +1 −0 lib/Cake/Console/Templates/skel/Config/core.php
  7. +2 −0 lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
  8. +2 −0 lib/Cake/Console/Templates/skel/webroot/index.php
  9. +2 −0 lib/Cake/Console/Templates/skel/webroot/test.php
  10. +2 −0 lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
  11. +1 −0 lib/Cake/Error/exceptions.php
  12. +2 −0 lib/Cake/Model/Datasource/Database/Sqlserver.php
  13. +1 −0 lib/Cake/Model/Model.php
  14. +7 −1 lib/Cake/Routing/Route/PluginShortRoute.php
  15. +8 −3 lib/Cake/Routing/Route/RedirectRoute.php
  16. +1 −0 lib/Cake/Test/Case/BasicsTest.php
  17. +1 −0 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
  18. +1 −0 lib/Cake/Test/Case/Configure/PhpReaderTest.php
  19. +1 −1 lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
  20. +1 −0 lib/Cake/Test/Case/Console/TaskCollectionTest.php
  21. +1 −0 lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
  22. +1 −0 lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
  23. +1 −0 lib/Cake/Test/Case/Controller/Component/DbAclTest.php
  24. +1 −0 lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
  25. +1 −0 lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
  26. +1 −1 lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
  27. +12 −0 lib/Cake/Test/Case/Controller/ControllerTest.php
  28. +3 −3 lib/Cake/Test/Case/Controller/ScaffoldTest.php
  29. +2 −0 lib/Cake/Test/Case/Error/ExceptionRendererTest.php
  30. +2 −0 lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
  31. +1 −0 lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
  32. +1 −0 lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
  33. +1 −0 lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
  34. +3 −0 lib/Cake/Test/Case/Model/CakeSchemaTest.php
  35. +1 −1 lib/Cake/Test/Case/Model/ConnectionManagerTest.php
  36. +1 −0 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  37. +1 −0 lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
  38. +5 −0 lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php
  39. +1 −0 lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php
  40. +1 −0 lib/Cake/Test/Case/Model/DbAclTest.php
  41. +1 −0 lib/Cake/Test/Case/Model/ModelIntegrationTest.php
  42. +1 −0 lib/Cake/Test/Case/Model/ModelReadTest.php
  43. +1 −0 lib/Cake/Test/Case/Model/ModelTestBase.php
  44. +2 −0 lib/Cake/Test/Case/Model/ModelWriteTest.php
  45. +1 −0 lib/Cake/Test/Case/Model/models.php
  46. +2 −0 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  47. +3 −0 lib/Cake/Test/Case/Routing/DispatcherTest.php
  48. +4 −0 lib/Cake/Test/Case/Routing/RouterTest.php
  49. +1 −1 lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
  50. +2 −0 lib/Cake/Test/Case/Utility/FolderTest.php
  51. +1 −0 lib/Cake/Test/Case/Utility/SetTest.php
  52. +1 −0 lib/Cake/Test/Case/Utility/ValidationTest.php
  53. +2 −0 lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  54. +5 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
  55. +2 −0 lib/Cake/Test/Case/View/Helper/JsHelperTest.php
  56. +10 −0 lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php
  57. +1 −0 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  58. +1 −0 lib/Cake/Test/Case/View/ViewTest.php
  59. +3 −0 lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php
  60. +1 −0 lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
  61. +1 −1 lib/Cake/Utility/Sanitize.php
  62. +1 −0 lib/Cake/View/Helper/JsBaseEngineHelper.php
View
@@ -200,6 +200,7 @@
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
+
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
@@ -374,6 +374,7 @@ public static function increment($key, $offset = 1, $config = 'default') {
self::set(null, $config);
return $success;
}
+
/**
* Decrement a number under the key and return decremented value.
*
@@ -401,6 +402,7 @@ public static function decrement($key, $offset = 1, $config = 'default') {
self::set(null, $config);
return $success;
}
+
/**
* Delete a key from the cache.
*
@@ -110,6 +110,7 @@ public function increment($key, $offset = 1) {
public function decrement($key, $offset = 1) {
return xcache_dec($key, $offset);
}
+
/**
* Delete a key from the cache
*
@@ -151,6 +151,7 @@ public function getOptionParser() {
))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.'));
return $parser;
}
+
/**
* Show help for this shell.
*
@@ -554,6 +554,7 @@ public function exceptions() {
);
$this->_filesRegexpUpdate($patterns);
}
+
/**
* Move application views files to where they now should be
*
@@ -200,6 +200,7 @@
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
+
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
@@ -365,6 +365,7 @@ form .submit input[type=submit] {
form .submit input[type=submit]:hover {
background: #5BA150;
}
+
/* Form errors */
form .error {
background: #FFDACC;
@@ -646,6 +647,7 @@ pre {
overflow: auto;
text-shadow: none;
}
+
/* excerpt */
.cake-code-dump pre,
.cake-code-dump pre code {
@@ -24,6 +24,7 @@
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
+
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
@@ -37,6 +38,7 @@
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
+
/**
* The actual directory name for the "app".
*
@@ -24,6 +24,7 @@
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
+
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
@@ -37,6 +38,7 @@
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
+
/**
* The actual directory name for the "app".
*
@@ -100,6 +100,7 @@ public function __construct(ComponentCollection $collection, $settings) {
$this->settings['opaque'] = md5($this->settings['realm']);
}
}
+
/**
* Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a
* login using Digest HTTP auth.
@@ -142,6 +143,7 @@ public function getUser($request) {
}
return false;
}
+
/**
* Find a user record using the standard options.
*
@@ -226,6 +226,7 @@ public function __construct($message, $code = 404) {
parent::__construct($message, $code);
}
}
+
/**
* Private Action exception - used when a controller action
* starts with a `_`.
@@ -585,6 +585,7 @@ public function value($data, $column = null) {
return parent::value($data, $column);
}
}
+
/**
* Returns an array of all result rows for a given SQL query.
* Returns false if no rows matched.
@@ -742,6 +743,7 @@ public function lastAffected($source = null) {
}
return $affected;
}
+
/**
* Executes given SQL statement.
*
@@ -3075,6 +3075,7 @@ protected function _validateWithModels($options) {
}
return $valid;
}
+
/**
* Marks a field as invalid, optionally setting the name of validation
* rule (in case of multiple validation for field) that was broken.
@@ -1,5 +1,4 @@
<?php
-App::uses('CakeRoute', 'Routing/Route');
/**
* Plugin short route, that copies the plugin param to the controller parameters
* It is used for supporting /:plugin routes.
@@ -18,6 +17,13 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+App::uses('CakeRoute', 'Routing/Route');
+
+/**
+ * Plugin Short Route class
+ *
+ * @package Cake.Routing.Route
+ */
class PluginShortRoute extends CakeRoute {
/**
@@ -1,7 +1,4 @@
<?php
-App::uses('CakeResponse', 'Network');
-App::uses('CakeRoute', 'Routing/Route');
-
/**
* Redirect route will perform an immediate redirect. Redirect routes
* are useful when you want to have Routing layer redirects occur in your
@@ -21,6 +18,14 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+App::uses('CakeResponse', 'Network');
+App::uses('CakeRoute', 'Routing/Route');
+
+/**
+ * Redirect Route class
+ *
+ * @package Cake.Routing.Route
+ */
class RedirectRoute extends CakeRoute {
/**
@@ -80,6 +80,7 @@ public function testArrayDiffKey() {
$this->assertEquals($result, array());
}
+
/**
* testHttpBase method
*
@@ -364,6 +364,7 @@ public function testClear() {
Cache::clear(false, 'memcache2');
}
+
/**
* test that a 0 duration can succesfully write.
*
@@ -28,6 +28,7 @@ public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
}
+
/**
* test reading files
*
@@ -19,12 +19,12 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
App::uses('ShellDispatcher', 'Console');
App::uses('ConsoleOutput', 'Console');
App::uses('ConsoleInput', 'Console');
App::uses('Shell', 'Console');
App::uses('TemplateTask', 'Console/Command/Task');
+
/**
* TemplateTaskTest class
*
@@ -71,6 +71,7 @@ public function testLoadWithEnableFalse() {
$this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled');
}
+
/**
* test missingtask exception
*
@@ -163,6 +163,7 @@ public function testAuthenticateChallenge() {
$result = $this->auth->authenticate($request, $this->response);
$this->assertFalse($result);
}
+
/**
* test authenticate sucesss
*
@@ -499,6 +499,7 @@ public function testDeleteRemovesChildren() {
$this->assertNull($this->Cookie->read('User.email'));
$this->Cookie->destroy();
}
+
/**
* Test deleting recursively with keys that don't exist.
*
@@ -470,6 +470,7 @@ public function testRevoke() {
$this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create');
}
+
/**
* debug function - to help editing/creating test cases for the ACL component
*
@@ -45,6 +45,7 @@ public function destination() {
$this->viewPath = 'Posts';
$this->render('index');
}
+
/**
* test method for ajax redirection + parameter parsing
*
@@ -110,6 +110,7 @@ public function testLoadWithEnableFalse() {
$this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled');
}
+
/**
* test missingcomponent exception
*
@@ -34,6 +34,7 @@ class MergeVarsAppController extends Controller {
* @var array
*/
public $components = array('MergeVar' => array('flag', 'otherFlag', 'redirect' => false));
+
/**
* helpers
*
@@ -42,7 +43,6 @@ class MergeVarsAppController extends Controller {
public $helpers = array('MergeVar' => array('format' => 'html', 'terse'));
}
-
/**
* MergeVar Component
*
@@ -35,12 +35,14 @@ class ControllerTestAppController extends Controller {
* @var array
*/
public $helpers = array('Html');
+
/**
* uses property
*
* @var array
*/
public $uses = array('ControllerPost');
+
/**
* components property
*
@@ -305,6 +307,7 @@ class TestComponent extends Object {
*/
public function beforeRedirect() {
}
+
/**
* initialize method
*
@@ -320,13 +323,15 @@ public function initialize(&$controller) {
*/
public function startup(&$controller) {
}
+
/**
* shutdown method
*
* @return void
*/
public function shutdown(&$controller) {
}
+
/**
* beforeRender callback
*
@@ -351,13 +356,19 @@ class AnotherTestController extends ControllerTestAppController {
* @var string 'Name'
*/
public $name = 'AnotherTest';
+
/**
* uses property
*
* @var array
*/
public $uses = null;
+/**
+ * merge parent
+ *
+ * @var string
+ */
protected $_mergeParent = 'ControllerTestAppController';
}
@@ -1114,6 +1125,7 @@ public function testStartupProcess() {
$Controller->startupProcess();
}
+
/**
* Tests that the shutdown process calls the correct functions
*
Oops, something went wrong. Retry.

0 comments on commit dfced8b

Please sign in to comment.