Permalink
Browse files

more whitespace coding standard corrections

  • Loading branch information...
1 parent a6f065e commit 4518624187474386965bdac7ce9808b92ea9fc4c @dereuromark dereuromark committed Jun 9, 2013
@@ -178,7 +178,7 @@ protected function _interactive() {
$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 @@ protected function _interactive() {
$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 @@ public function confirmController($controllerName, $useDynamicScaffold, $helpers
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 @@ public function doComponents() {
* @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);
@@ -234,13 +234,13 @@ protected function _interactive() {
}
$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);
}
@@ -99,11 +99,11 @@ public function initialize(Component $Component) {
*/
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();
View
@@ -590,7 +590,7 @@ public static function location($className) {
* 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');
@@ -154,7 +154,7 @@ public function testParseParams() {
'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 @@ public function testParseParams() {
'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);
@@ -283,7 +283,7 @@ public function testAllow() {
$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'));
@@ -857,7 +857,7 @@ public function testBeforeRedirectCallingHeader() {
$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')
@@ -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),
@@ -260,7 +260,7 @@ public function testSimpleRead() {
$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);
@@ -741,11 +741,11 @@ public function testGetLog() {
* @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]);
@@ -151,7 +151,7 @@ public function testDeleteArticleBLinks() {
* @return void
*/
public function testDeleteDependentWithConditions() {
- $this->loadFixtures('Cd','Book','OverallFavorite');
+ $this->loadFixtures('Cd', 'Book', 'OverallFavorite');
$Cd = new Cd();
$Book = new Book();
@@ -2069,7 +2069,7 @@ public function testCreationWithMultipleData() {
$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 @@ public function testCreationWithMultipleData() {
$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 @@ public function testCreationWithMultipleData() {
$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 @@ public function testCreationWithMultipleData() {
$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 @@ public function testCreationWithMultipleDataSameModel() {
$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 @@ public function testSaveAllTransaction() {
$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 @@ public function testSaveManyTransaction() {
$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')
));
@@ -870,7 +870,7 @@ public function testAdminDispatch() {
$_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');
@@ -870,7 +870,7 @@ public function testParseTrailing() {
* @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',
@@ -1552,7 +1552,7 @@ public function testUrlGenerationWithLegacyPrefixes() {
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',
@@ -232,10 +232,10 @@ public function testSort() {
$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 @@ public function testSort() {
$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 @@ public function testSort() {
$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 @@ public function testExtract() {
)
)
);
- $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 @@ public function testExtract() {
)
)
);
- $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 @@ public function testClassicExtract() {
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 @@ public function testCombine() {
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 @@ public function testCombine() {
$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 @@ public function testCombine() {
$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 @@ public function testMapReverse() {
$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 @@ public function testMapReverse() {
$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 @@ public function testMapNesting() {
'Content-Length' => "50210",
),
'meta' => array(
- 'keywords' => array('testing','tests'),
+ 'keywords' => array('testing', 'tests'),
'description' => 'describe me',
),
'get_vars' => '',
@@ -2384,7 +2384,7 @@ public function testMapNesting() {
'Content-Length' => "50210",
),
'meta' => array(
- 'keywords' => array('testing','tests'),
+ 'keywords' => array('testing', 'tests'),
'description' => 'describe me',
),
'get_vars' => '',
Oops, something went wrong.

0 comments on commit 4518624

Please sign in to comment.