From 4518624187474386965bdac7ce9808b92ea9fc4c Mon Sep 17 00:00:00 2001 From: euromark Date: Sun, 9 Jun 2013 17:39:48 +0200 Subject: [PATCH] more whitespace coding standard corrections --- .../Console/Command/Task/ControllerTask.php | 10 ++--- lib/Cake/Console/Command/Task/ModelTask.php | 4 +- lib/Cake/Controller/Component/Acl/PhpAcl.php | 4 +- lib/Cake/Core/App.php | 2 +- .../Test/Case/Console/ShellDispatcherTest.php | 4 +- .../Controller/Component/Acl/DbAclTest.php | 2 +- .../Component/RequestHandlerComponentTest.php | 2 +- lib/Cake/Test/Case/Model/CakeSchemaTest.php | 2 +- .../Case/Model/Datasource/CakeSessionTest.php | 2 +- .../Case/Model/Datasource/DboSourceTest.php | 4 +- lib/Cake/Test/Case/Model/ModelDeleteTest.php | 2 +- lib/Cake/Test/Case/Model/ModelWriteTest.php | 14 +++---- lib/Cake/Test/Case/Routing/DispatcherTest.php | 2 +- .../Test/Case/Routing/Route/CakeRouteTest.php | 2 +- lib/Cake/Test/Case/Routing/RouterTest.php | 2 +- lib/Cake/Test/Case/Utility/SetTest.php | 42 +++++++++---------- lib/Cake/Test/Case/Utility/ValidationTest.php | 4 +- .../Test/Case/View/Helper/FormHelperTest.php | 8 ++-- lib/Cake/Test/Fixture/AcoTwoFixture.php | 20 ++++----- lib/Cake/Test/Fixture/CakeSessionFixture.php | 2 +- lib/Cake/Test/Fixture/SessionFixture.php | 2 +- lib/Cake/Test/Fixture/UuidTreeFixture.php | 6 +-- 22 files changed, 71 insertions(+), 71 deletions(-) diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 177d949e4..4c59b498b 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -178,7 +178,7 @@ class ControllerTask extends BakeTask { $components = $this->doComponents(); $wannaUseSession = $this->in( - __d('cake_console', "Would you like to use Session flash messages?"), array('y','n'), 'y' + __d('cake_console', "Would you like to use Session flash messages?"), array('y', 'n'), 'y' ); } } else { @@ -196,7 +196,7 @@ class ControllerTask extends BakeTask { $baked = false; if ($this->interactive === true) { $this->confirmController($controllerName, $useDynamicScaffold, $helpers, $components); - $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n'), 'y'); if (strtolower($looksGood) === 'y') { $baked = $this->bake($controllerName, $actions, $helpers, $components); @@ -263,11 +263,11 @@ class ControllerTask extends BakeTask { protected function _askAboutMethods() { $wannaBakeCrud = $this->in( __d('cake_console', "Would you like to create some basic class methods \n(index(), add(), view(), edit())?"), - array('y','n'), 'n' + array('y', 'n'), 'n' ); $wannaBakeAdminCrud = $this->in( __d('cake_console', "Would you like to create the basic class methods for admin routing?"), - array('y','n'), 'n' + array('y', 'n'), 'n' ); return array($wannaBakeCrud, $wannaBakeAdminCrud); } @@ -384,7 +384,7 @@ class ControllerTask extends BakeTask { * @return array Array of values for property. */ protected function _doPropertyChoices($prompt, $example) { - $proceed = $this->in($prompt, array('y','n'), 'n'); + $proceed = $this->in($prompt, array('y', 'n'), 'n'); $property = array(); if (strtolower($proceed) === 'y') { $propertyList = $this->in($example); diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index 483339c28..d2232b188 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -234,13 +234,13 @@ class ModelTask extends BakeTask { } $prompt = __d('cake_console', "Would you like to supply validation criteria \nfor the fields in your model?"); - $wannaDoValidation = $this->in($prompt, array('y','n'), 'y'); + $wannaDoValidation = $this->in($prompt, array('y', 'n'), 'y'); if (array_search($useTable, $this->_tables) !== false && strtolower($wannaDoValidation) === 'y') { $validate = $this->doValidation($tempModel); } $prompt = __d('cake_console', "Would you like to define model associations\n(hasMany, hasOne, belongsTo, etc.)?"); - $wannaDoAssoc = $this->in($prompt, array('y','n'), 'y'); + $wannaDoAssoc = $this->in($prompt, array('y', 'n'), 'y'); if (strtolower($wannaDoAssoc) === 'y') { $associations = $this->doAssociations($tempModel); } diff --git a/lib/Cake/Controller/Component/Acl/PhpAcl.php b/lib/Cake/Controller/Component/Acl/PhpAcl.php index 0b30e5ae5..6e0291fd3 100644 --- a/lib/Cake/Controller/Component/Acl/PhpAcl.php +++ b/lib/Cake/Controller/Component/Acl/PhpAcl.php @@ -99,11 +99,11 @@ class PhpAcl extends Object implements AclInterface { */ public function build(array $config) { if (empty($config['roles'])) { - throw new AclException(__d('cake_dev','"roles" section not found in configuration.')); + throw new AclException(__d('cake_dev', '"roles" section not found in configuration.')); } if (empty($config['rules']['allow']) && empty($config['rules']['deny'])) { - throw new AclException(__d('cake_dev','Neither "allow" nor "deny" rules were provided in configuration.')); + throw new AclException(__d('cake_dev', 'Neither "allow" nor "deny" rules were provided in configuration.')); } $rules['allow'] = !empty($config['rules']['allow']) ? $config['rules']['allow'] : array(); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index f709129e3..9d0309bea 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -590,7 +590,7 @@ class App { * an single array to $type, * @param string $name Name of the Class or a unique name for the file * @param boolean|array $parent boolean true if Class Parent should be searched, accepts key => value - * array('parent' => $parent ,'file' => $file, 'search' => $search, 'ext' => '$ext'); + * array('parent' => $parent, 'file' => $file, 'search' => $search, 'ext' => '$ext'); * $ext allows setting the extension of the file name * based on Inflector::underscore($name) . ".$ext"; * @param array $search paths to search for files, array('path 1', 'path 2', 'path 3'); diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index 031af73d7..3d647be48 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -154,7 +154,7 @@ class ShellDispatcherTest extends CakeTestCase { 'app' => 'new', 'webroot' => 'webroot', 'working' => str_replace('/', DS, '/var/www/htdocs/new'), - 'root' => str_replace('/', DS,'/var/www/htdocs') + 'root' => str_replace('/', DS, '/var/www/htdocs') ); $Dispatcher->parseParams($params); $this->assertEquals($expected, $Dispatcher->params); @@ -380,7 +380,7 @@ class ShellDispatcherTest extends CakeTestCase { 'app' => 'old', 'webroot' => 'webroot', 'working' => str_replace('/', DS, '/var/www/htdocs/old'), - 'root' => str_replace('/', DS,'/var/www/htdocs') + 'root' => str_replace('/', DS, '/var/www/htdocs') ); $Dispatcher->parseParams($params); $this->assertEquals($expected, $Dispatcher->params); diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php index 2362c7e93..e4d936963 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php @@ -283,7 +283,7 @@ class DbAclTest extends CakeTestCase { $this->assertTrue($this->Acl->check('Samir', 'view', 'read')); $this->assertTrue($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/view', 'update')); - $this->assertFalse($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update','*')); + $this->assertFalse($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update', '*')); $this->assertTrue($this->Acl->allow('root/users/Samir', 'ROOT/tpsReports/update', '*')); $this->assertTrue($this->Acl->check('Samir', 'update', 'read')); $this->assertTrue($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update', 'update')); diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 2a17f1fc7..769effe05 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -857,7 +857,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $controller = $this->getMock('Controller', array('header')); $RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); - $RequestHandler->response = $this->getMock('CakeResponse', array('_sendHeader','statusCode')); + $RequestHandler->response = $this->getMock('CakeResponse', array('_sendHeader', 'statusCode')); $RequestHandler->request = $this->getMock('CakeRequest'); $RequestHandler->request->expects($this->once())->method('is') ->with('ajax') diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index 5b2633b57..a746a370d 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -130,7 +130,7 @@ class TestAppSchema extends CakeSchema { * @var array */ public $comments = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => 0,'key' => 'primary'), + 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), 'article_id' => array('type' => 'integer', 'null' => false), 'user_id' => array('type' => 'integer', 'null' => false), 'comment' => array('type' => 'text', 'null' => true, 'default' => null), diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index 1d7014aa8..b034c2d54 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -260,7 +260,7 @@ class CakeSessionTest extends CakeTestCase { $result = TestCakeSession::read('testing'); $this->assertEquals('1,2,3', $result); - TestCakeSession::write('testing', array('1' => 'one', '2' => 'two','3' => 'three')); + TestCakeSession::write('testing', array('1' => 'one', '2' => 'two', '3' => 'three')); $result = TestCakeSession::read('testing.1'); $this->assertEquals('one', $result); diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 4b3aec644..3320c1765 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -741,11 +741,11 @@ class DboSourceTest extends CakeTestCase { * @return void */ public function testGetLogParams() { - $this->testDb->logQuery('Query 1', array(1,2,'abc')); + $this->testDb->logQuery('Query 1', array(1, 2, 'abc')); $this->testDb->logQuery('Query 2', array('field1' => 1, 'field2' => 'abc')); $log = $this->testDb->getLog(); - $expected = array('query' => 'Query 1', 'params' => array(1,2,'abc'), 'affected' => '', 'numRows' => '', 'took' => ''); + $expected = array('query' => 'Query 1', 'params' => array(1, 2, 'abc'), 'affected' => '', 'numRows' => '', 'took' => ''); $this->assertEquals($expected, $log['log'][0]); $expected = array('query' => 'Query 2', 'params' => array('field1' => 1, 'field2' => 'abc'), 'affected' => '', 'numRows' => '', 'took' => ''); $this->assertEquals($expected, $log['log'][1]); diff --git a/lib/Cake/Test/Case/Model/ModelDeleteTest.php b/lib/Cake/Test/Case/Model/ModelDeleteTest.php index dd089820b..a4e1681c9 100644 --- a/lib/Cake/Test/Case/Model/ModelDeleteTest.php +++ b/lib/Cake/Test/Case/Model/ModelDeleteTest.php @@ -151,7 +151,7 @@ class ModelDeleteTest extends BaseModelTest { * @return void */ public function testDeleteDependentWithConditions() { - $this->loadFixtures('Cd','Book','OverallFavorite'); + $this->loadFixtures('Cd', 'Book', 'OverallFavorite'); $Cd = new Cd(); $Book = new Book(); diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 29b3c4396..f9857beb1 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -2069,7 +2069,7 @@ class ModelWriteTest extends BaseModelTest { $Comment = new Comment(); $articles = $Article->find('all', array( - 'fields' => array('id','title'), + 'fields' => array('id', 'title'), 'recursive' => -1, 'order' => array('Article.id' => 'ASC') )); @@ -2089,7 +2089,7 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($expected, $articles); $comments = $Comment->find('all', array( - 'fields' => array('id','article_id','user_id','comment','published'), + 'fields' => array('id', 'article_id', 'user_id', 'comment', 'published'), 'recursive' => -1, 'order' => array('Comment.id' => 'ASC') )); @@ -2156,7 +2156,7 @@ class ModelWriteTest extends BaseModelTest { $this->assertFalse(empty($result)); $articles = $Article->find('all', array( - 'fields' => array('id','title'), + 'fields' => array('id', 'title'), 'recursive' => -1, 'order' => array('Article.id' => 'ASC') )); @@ -2176,7 +2176,7 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($expected, $articles); $comments = $Comment->find('all', array( - 'fields' => array('id','article_id','user_id','comment','published'), + 'fields' => array('id', 'article_id', 'user_id', 'comment', 'published'), 'recursive' => -1, 'order' => array('Comment.id' => 'ASC') )); @@ -2267,7 +2267,7 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals('First Article', $result); $articles = $Article->find('all', array( - 'fields' => array('id','title'), + 'fields' => array('id', 'title'), 'recursive' => -1, 'order' => array('Article.id' => 'ASC') )); @@ -4258,7 +4258,7 @@ class ModelWriteTest extends BaseModelTest { $result = $TestModel->find('all', array( 'recursive' => -1, - 'fields' => array('author_id', 'title','body','published'), + 'fields' => array('author_id', 'title', 'body', 'published'), 'order' => array('Post.created' => 'ASC') )); @@ -5690,7 +5690,7 @@ class ModelWriteTest extends BaseModelTest { $result = $TestModel->find('all', array( 'recursive' => -1, - 'fields' => array('author_id', 'title','body','published'), + 'fields' => array('author_id', 'title', 'body', 'published'), 'order' => array('Post.created' => 'ASC') )); diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 0c3850a07..8727b78f6 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -870,7 +870,7 @@ class DispatcherTest extends CakeTestCase { $_POST = array(); $Dispatcher = new TestDispatcher(); Configure::write('Routing.prefixes', array('admin')); - Configure::write('App.baseUrl','/cake/repo/branches/1.2.x.x/index.php'); + Configure::write('App.baseUrl', '/cake/repo/branches/1.2.x.x/index.php'); $url = new CakeRequest('admin/test_dispatch_pages/index/param:value/param2:value2'); $response = $this->getMock('CakeResponse'); diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php index 7a61ccdf7..93fa7c514 100644 --- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php @@ -870,7 +870,7 @@ class CakeRouteTest extends CakeTestCase { * @return void */ public function testParseTrailingUTF8() { - $route = new CakeRoute('/category/**', array('controller' => 'categories','action' => 'index')); + $route = new CakeRoute('/category/**', array('controller' => 'categories', 'action' => 'index')); $result = $route->parse('/category/%D9%85%D9%88%D8%A8%D8%A7%DB%8C%D9%84'); $expected = array( 'controller' => 'categories', diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index 3628fc523..8f98c3d59 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -1552,7 +1552,7 @@ class RouterTest extends CakeTestCase { Router::setRequestInfo( $request->addParams(array( 'plugin' => null, 'controller' => 'images', 'action' => 'index', - 'prefix' => null, 'admin' => false,'url' => array('url' => 'images/index') + 'prefix' => null, 'admin' => false, 'url' => array('url' => 'images/index') ))->addPaths(array( 'base' => '', 'here' => '/images/index', diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index 465ac4706..1b138a710 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -232,10 +232,10 @@ class SetTest extends CakeTestCase { $a = array( 0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))), - 1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))) + 1 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))) ); $b = array( - 0 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))), + 0 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))), 1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))) ); @@ -244,10 +244,10 @@ class SetTest extends CakeTestCase { $b = array( 0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))), - 1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))) + 1 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))) ); $a = array( - 0 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))), + 0 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))), 1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))) ); @@ -257,12 +257,12 @@ class SetTest extends CakeTestCase { $a = array( 0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))), 1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))), - 2 => array('Person' => array('name' => 'Adam'),'Friend' => array(array('name' => 'Bob'))) + 2 => array('Person' => array('name' => 'Adam'), 'Friend' => array(array('name' => 'Bob'))) ); $b = array( - 0 => array('Person' => array('name' => 'Adam'),'Friend' => array(array('name' => 'Bob'))), + 0 => array('Person' => array('name' => 'Adam'), 'Friend' => array(array('name' => 'Bob'))), 1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))), - 2 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))) + 2 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))) ); $a = Set::sort($a, '{n}.Person.name', 'asc'); $this->assertEquals($a, $b); @@ -880,11 +880,11 @@ class SetTest extends CakeTestCase { ) ) ); - $expected = array(array('name' => 'zipfile2.zip','type' => 'application/x-zip-compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784')); + $expected = array(array('name' => 'zipfile2.zip', 'type' => 'application/x-zip-compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784')); $r = Set::extract('/file/.[type=application/x-zip-compressed]', $f); $this->assertEquals($expected, $r); - $expected = array(array('name' => 'zipfile.zip','type' => 'application/zip','tmp_name' => '/tmp/php178.tmp','error' => 0,'size' => '564647')); + $expected = array(array('name' => 'zipfile.zip', 'type' => 'application/zip','tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647')); $r = Set::extract('/file/.[type=application/zip]', $f); $this->assertEquals($expected, $r); @@ -917,13 +917,13 @@ class SetTest extends CakeTestCase { ) ) ); - $expected = array(array('name' => 'zipfile2.zip','type' => 'application/x zip compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784')); + $expected = array(array('name' => 'zipfile2.zip', 'type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784')); $r = Set::extract('/file/.[type=application/x zip compressed]', $f); $this->assertEquals($expected, $r); $expected = array( - array('name' => 'zipfile.zip','type' => 'application/zip','tmp_name' => '/tmp/php178.tmp','error' => 0,'size' => '564647'), - array('name' => 'zipfile2.zip','type' => 'application/x zip compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784') + array('name' => 'zipfile.zip','type' => 'application/zip', 'tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'), + array('name' => 'zipfile2.zip','type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784') ); $r = Set::extract('/file/.[tmp_name=/tmp\/php17/]', $f); $this->assertEquals($expected, $r); @@ -1560,7 +1560,7 @@ class SetTest extends CakeTestCase { 0 => array('name' => 'zero') ); $result = Set::extract($a, '{s}.name'); - $expected = array('page','fruit'); + $expected = array('page', 'fruit'); $this->assertEquals($expected, $result); $a = array( @@ -1860,7 +1860,7 @@ class SetTest extends CakeTestCase { array('User' => array('id' => 14, 'group_id' => 2, 'Data' => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))), array('User' => array('id' => 25, 'group_id' => 1, - 'Data' => array('user' => 'gwoo','name' => 'The Gwoo')))); + 'Data' => array('user' => 'gwoo', 'name' => 'The Gwoo')))); $result = Set::combine($a, '{n}.User.id'); $expected = array(2 => null, 14 => null, 25 => null); $this->assertEquals($expected, $result); @@ -1871,7 +1871,7 @@ class SetTest extends CakeTestCase { $result = Set::combine($a, '{n}.User.id', '{n}.User.Data'); $expected = array( - 2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'), + 2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'), 14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'), 25 => array('user' => 'gwoo', 'name' => 'The Gwoo')); $this->assertEquals($expected, $result); @@ -1961,11 +1961,11 @@ class SetTest extends CakeTestCase { $b = new stdClass(); $b->users = array( array('User' => array('id' => 2, 'group_id' => 1, - 'Data' => array('user' => 'mariano.iglesias','name' => 'Mariano Iglesias'))), + 'Data' => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'))), array('User' => array('id' => 14, 'group_id' => 2, 'Data' => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))), array('User' => array('id' => 25, 'group_id' => 1, - 'Data' => array('user' => 'gwoo','name' => 'The Gwoo')))); + 'Data' => array('user' => 'gwoo', 'name' => 'The Gwoo')))); $result = Set::combine($b, 'users.{n}.User.id'); $expected = array(2 => null, 14 => null, 25 => null); $this->assertEquals($expected, $result); @@ -2032,7 +2032,7 @@ class SetTest extends CakeTestCase { $expected = array( 'Array1' => array( - 'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3','Array1Data4' => 'Array1Data4 value 4', + 'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3', 'Array1Data4' => 'Array1Data4 value 4', 'Array1Data5' => 'Array1Data5 value 5', 'Array1Data6' => 'Array1Data6 value 6', 'Array1Data7' => 'Array1Data7 value 7', 'Array1Data8' => 'Array1Data8 value 8'), 'string' => 1, 'another' => 'string', @@ -2055,7 +2055,7 @@ class SetTest extends CakeTestCase { $expected = array( 'Array1' => array( - 'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3','Array1Data4' => 'Array1Data4 value 4', + 'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3', 'Array1Data4' => 'Array1Data4 value 4', 'Array1Data5' => 'Array1Data5 value 5', 'Array1Data6' => 'Array1Data6 value 6', 'Array1Data7' => 'Array1Data7 value 7', 'Array1Data8' => 'Array1Data8 value 8'), 'string' => 1, 'another' => 'string', @@ -2357,7 +2357,7 @@ class SetTest extends CakeTestCase { 'Content-Length' => "50210", ), 'meta' => array( - 'keywords' => array('testing','tests'), + 'keywords' => array('testing', 'tests'), 'description' => 'describe me', ), 'get_vars' => '', @@ -2384,7 +2384,7 @@ class SetTest extends CakeTestCase { 'Content-Length' => "50210", ), 'meta' => array( - 'keywords' => array('testing','tests'), + 'keywords' => array('testing', 'tests'), 'description' => 'describe me', ), 'get_vars' => '', diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 25cd02304..6a3311207 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -945,7 +945,7 @@ class ValidationTest extends CakeTestCase { $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<', 'check2' => 7))); $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 7))); $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal','check2' => 6))); + $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 6))); $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 6))); $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => 'less or equal', 'check2' => 7))); $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<=', 'check2' => 7))); @@ -964,7 +964,7 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'less or equal', 'check2' => 6))); $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '<=', 'check2' => 6))); $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'equal to', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '==','check2' => 6))); + $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '==', 'check2' => 6))); $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'not equal', 'check2' => 7))); $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '!=', 'check2' => 7))); } diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 836650c04..73cfb283e 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -1668,7 +1668,7 @@ class FormHelperTest extends CakeTestCase { $result = $this->Form->create('ValidateUser', array('type' => 'post', 'action' => 'add')); $encoding = strtolower(Configure::read('App.encoding')); $expected = array( - 'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id','accept-charset' => $encoding), + 'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id', 'accept-charset' => $encoding), 'div' => array('style' => 'display:none;'), 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' @@ -2270,7 +2270,7 @@ class FormHelperTest extends CakeTestCase { $result = $this->Form->input('prueba', array( 'type' => 'time', 'timeFormat' => 24 , 'dateFormat' => 'DMY' , 'minYear' => 2008, - 'maxYear' => date('Y') + 1 ,'interval' => 15 + 'maxYear' => date('Y') + 1 , 'interval' => 15 )); $result = explode(':', $result); $this->assertNotRegExp('##', $result[1]); @@ -7236,7 +7236,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'form' => array( 'id' => 'ContactNonStandardPkEditForm', 'method' => 'post', - 'action' => '/contact_non_standard_pks/edit/1','accept-charset' => $encoding + 'action' => '/contact_non_standard_pks/edit/1', 'accept-charset' => $encoding ), 'div' => array('style' => 'display:none;'), 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), @@ -7481,7 +7481,7 @@ class FormHelperTest extends CakeTestCase { */ public function testCreateWithAcceptCharset() { $result = $this->Form->create('UserForm', array( - 'type' => 'post', 'action' => 'login','encoding' => 'iso-8859-1' + 'type' => 'post', 'action' => 'login', 'encoding' => 'iso-8859-1' ) ); $expected = array( diff --git a/lib/Cake/Test/Fixture/AcoTwoFixture.php b/lib/Cake/Test/Fixture/AcoTwoFixture.php index 778a24d4f..8cacd0f1a 100644 --- a/lib/Cake/Test/Fixture/AcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/AcoTwoFixture.php @@ -53,15 +53,15 @@ class AcoTwoFixture extends CakeTestFixture { * @var array */ public $records = array( - array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20), - array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports','lft' => 2, 'rght' => 9), - array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'view', 'lft' => 3, 'rght' => 6), - array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'current', 'lft' => 4, 'rght' => 5), - array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'update', 'lft' => 7, 'rght' => 8), - array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'printers', 'lft' => 10, 'rght' => 19), - array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'print', 'lft' => 11, 'rght' => 14), - array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize','lft' => 12, 'rght' => 13), - array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'refill', 'lft' => 15, 'rght' => 16), - array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'smash', 'lft' => 17, 'rght' => 18), + array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20), + array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports','lft' => 2, 'rght' => 9), + array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'view', 'lft' => 3, 'rght' => 6), + array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'current', 'lft' => 4, 'rght' => 5), + array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'update', 'lft' => 7, 'rght' => 8), + array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'printers', 'lft' => 10, 'rght' => 19), + array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'print', 'lft' => 11, 'rght' => 14), + array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize','lft' => 12, 'rght' => 13), + array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'refill', 'lft' => 15, 'rght' => 16), + array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'smash', 'lft' => 17, 'rght' => 18), ); } diff --git a/lib/Cake/Test/Fixture/CakeSessionFixture.php b/lib/Cake/Test/Fixture/CakeSessionFixture.php index a895aba4e..4bed4dc39 100644 --- a/lib/Cake/Test/Fixture/CakeSessionFixture.php +++ b/lib/Cake/Test/Fixture/CakeSessionFixture.php @@ -35,7 +35,7 @@ class CakeSessionFixture extends CakeTestFixture { */ public $fields = array( 'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'), - 'data' => array('type' => 'text','null' => true), + 'data' => array('type' => 'text', 'null' => true), 'expires' => array('type' => 'integer', 'length' => 11, 'null' => true) ); diff --git a/lib/Cake/Test/Fixture/SessionFixture.php b/lib/Cake/Test/Fixture/SessionFixture.php index 0e47eb18f..c7f8bce00 100644 --- a/lib/Cake/Test/Fixture/SessionFixture.php +++ b/lib/Cake/Test/Fixture/SessionFixture.php @@ -39,7 +39,7 @@ class SessionFixture extends CakeTestFixture { */ public $fields = array( 'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'), - 'data' => array('type' => 'text','null' => true), + 'data' => array('type' => 'text', 'null' => true), 'expires' => array('type' => 'integer', 'length' => 11, 'null' => true) ); diff --git a/lib/Cake/Test/Fixture/UuidTreeFixture.php b/lib/Cake/Test/Fixture/UuidTreeFixture.php index 2540d61c4..a3fc8f855 100644 --- a/lib/Cake/Test/Fixture/UuidTreeFixture.php +++ b/lib/Cake/Test/Fixture/UuidTreeFixture.php @@ -40,9 +40,9 @@ class UuidTreeFixture extends CakeTestFixture { */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), - 'name' => array('type' => 'string','null' => false), + 'name' => array('type' => 'string', 'null' => false), 'parent_id' => array('type' => 'string', 'length' => 36, 'null' => true), - 'lft' => array('type' => 'integer','null' => false), - 'rght' => array('type' => 'integer','null' => false) + 'lft' => array('type' => 'integer', 'null' => false), + 'rght' => array('type' => 'integer', 'null' => false) ); }