Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed May 17, 2013
1 parent de7535d commit 97c2cb3
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/ProjectTask.php
Expand Up @@ -404,15 +404,15 @@ public function getPrefix() {
}
if ($this->interactive) {
$this->hr();
$this->out(__d('cake_console', 'You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/Config/core.php to use prefix routing.'));
$this->out(__d('cake_console', 'You need to enable Configure::write(\'Routing.prefixes\', array(\'admin\')) in /app/Config/core.php to use prefix routing.'));
$this->out(__d('cake_console', 'What would you like the prefix route to be?'));
$this->out(__d('cake_console', 'Example: www.example.com/admin/controller'));
while (!$admin) {
$admin = $this->in(__d('cake_console', 'Enter a routing prefix:'), null, 'admin');
}
if ($this->cakeAdmin($admin) !== true) {
$this->out(__d('cake_console', '<error>Unable to write to</error> /app/Config/core.php.'));
$this->out(__d('cake_console', 'You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/Config/core.php to use prefix routing.'));
$this->out(__d('cake_console', 'You need to enable Configure::write(\'Routing.prefixes\', array(\'admin\')) in /app/Config/core.php to use prefix routing.'));
$this->_stop();
}
return $admin . '_';
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/I18n/I18n.php
Expand Up @@ -590,7 +590,7 @@ protected function _parseLiteralValue($string) {
$string = $string[1];
if (substr($string, 0, 2) === $this->_escape . 'x') {
$delimiter = $this->_escape . 'x';
return implode('', array_map('chr', array_map('hexdec',array_filter(explode($delimiter, $string)))));
return implode('', array_map('chr', array_map('hexdec', array_filter(explode($delimiter, $string)))));
}
if (substr($string, 0, 2) === $this->_escape . 'd') {
$delimiter = $this->_escape . 'd';
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
Expand Up @@ -1046,7 +1046,7 @@ public function testRemove() {
array($modelClass => array('name' => '1.2')));
$this->assertEquals($children, $expects);

$topNodes = $this->Tree->children(false, true,array('name'));
$topNodes = $this->Tree->children(false, true, array('name'));
$expects = array(array($modelClass => array('name' => '1. Root')),
array($modelClass => array('name' => '1.1')));
$this->assertEquals($topNodes, $expects);
Expand Down Expand Up @@ -1077,7 +1077,7 @@ public function testRemoveLastTopParent() {
$this->assertEquals($initialCount, $laterCount);
$this->assertEquals($initialTopNodes, $laterTopNodes);

$topNodes = $this->Tree->children(false, true,array('name'));
$topNodes = $this->Tree->children(false, true, array('name'));
$expects = array(array($modelClass => array('name' => '1.1')),
array($modelClass => array('name' => '1.2')),
array($modelClass => array('name' => '1. Root')));
Expand Down Expand Up @@ -1148,7 +1148,7 @@ public function testRemoveAndDelete() {
);
$this->assertEquals($children, $expects);

$topNodes = $this->Tree->children(false, true,array('name'));
$topNodes = $this->Tree->children(false, true, array('name'));
$expects = array(array($modelClass => array('name' => '1. Root')));
$this->assertEquals($topNodes, $expects);

Expand Down
14 changes: 7 additions & 7 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -232,7 +232,7 @@ public function testGroupBy() {
array('Product' => array('type' => 'Music'), array('price' => 4)),
array('Product' => array('type' => 'Toy'), array('price' => 3))
);
$result = $Product->find('all',array(
$result = $Product->find('all', array(
'fields' => array('Product.type', 'MIN(Product.price) as price'),
'group' => 'Product.type',
'order' => 'Product.type ASC'
Expand Down Expand Up @@ -7717,34 +7717,34 @@ public function testVirtualFields() {
$this->assertFalse((bool)$result['Author']['false']);
}

$result = $Post->find('first',array('fields' => array('author_id')));
$result = $Post->find('first', array('fields' => array('author_id')));
$this->assertFalse(isset($result['Post']['two']));
$this->assertFalse(isset($result['Author']['false']));

$result = $Post->find('first',array('fields' => array('author_id', 'two')));
$result = $Post->find('first', array('fields' => array('author_id', 'two')));
$this->assertEquals(2, $result['Post']['two']);
$this->assertFalse(isset($result['Author']['false']));

$result = $Post->find('first',array('fields' => array('two')));
$result = $Post->find('first', array('fields' => array('two')));
$this->assertEquals(2, $result['Post']['two']);

$Post->id = 1;
$result = $Post->field('two');
$this->assertEquals(2, $result);

$result = $Post->find('first',array(
$result = $Post->find('first', array(
'conditions' => array('two' => 2),
'limit' => 1
));
$this->assertEquals(2, $result['Post']['two']);

$result = $Post->find('first',array(
$result = $Post->find('first', array(
'conditions' => array('two <' => 3),
'limit' => 1
));
$this->assertEquals(2, $result['Post']['two']);

$result = $Post->find('first',array(
$result = $Post->find('first', array(
'conditions' => array('NOT' => array('two >' => 3)),
'limit' => 1
));
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Model/ModelWriteTest.php
Expand Up @@ -396,7 +396,7 @@ public function testCounterCacheUpdated() {
$data[$Post->alias]['user_id'] = 301;
$Post->save($data);

$users = $User->find('all',array('order' => 'User.id'));
$users = $User->find('all', array('order' => 'User.id'));
$this->assertEquals(1, $users[0]['User']['post_count']);
$this->assertEquals(2, $users[1]['User']['post_count']);
}
Expand All @@ -423,7 +423,7 @@ public function testCounterCacheWithNonstandardPrimaryKey() {
$data[$Post->alias]['uid'] = 301;
$Post->save($data);

$users = $User->find('all',array('order' => 'User.uid'));
$users = $User->find('all', array('order' => 'User.uid'));
$this->assertEquals(1, $users[0]['User']['post_count']);
$this->assertEquals(2, $users[1]['User']['post_count']);
}
Expand Down Expand Up @@ -551,7 +551,7 @@ public function testCounterCacheMultipleCaches() {
));
$data[$Post->alias]['user_id'] = 301;
$Post->save($data);
$result = $User->find('all',array('order' => 'User.id'));
$result = $User->find('all', array('order' => 'User.id'));
$this->assertEquals(2, $result[0]['User']['post_count']);
$this->assertEquals(1, $result[1]['User']['posts_published']);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -1076,7 +1076,7 @@ public function testAuth() {
'pass' => 'hunter2'
)
));
$this->assertEquals($socket->request['auth'],array('Basic' => array('user' => 'joel', 'pass' => 'hunter2')));
$this->assertEquals($socket->request['auth'], array('Basic' => array('user' => 'joel', 'pass' => 'hunter2')));
$this->assertTrue(strpos($socket->request['header'], 'Authorization: Basic am9lbDpodW50ZXIy') !== false);
}

Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Utility/SetTest.php
Expand Up @@ -282,15 +282,15 @@ public function testSort() {
$this->assertEquals($a, $b);

$a = array(
array(7,6,4),
array(3,4,5),
array(3,2,array(1,1,1)),
array(7, 6, 4),
array(3, 4, 5),
array(3, 2, array(1, 1, 1)),
);

$b = array(
array(3,2,array(1,1,1)),
array(3,4,5),
array(7,6,4),
array(3, 2, array(1, 1, 1)),
array(3, 4, 5),
array(7, 6, 4),
);

$a = Set::sort($a, '{n}', 'asc');
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/View/Helper/FormHelperTest.php
Expand Up @@ -3472,10 +3472,10 @@ public function testInputErrorEscape() {
$this->Form->create('ValidateProfile');
$ValidateProfile = ClassRegistry::getObject('ValidateProfile');
$ValidateProfile->validationErrors['city'] = array('required<br>');
$result = $this->Form->input('city',array('error' => array('attributes' => array('escape' => true))));
$result = $this->Form->input('city', array('error' => array('attributes' => array('escape' => true))));
$this->assertRegExp('/required&lt;br&gt;/', $result);

$result = $this->Form->input('city',array('error' => array('attributes' => array('escape' => false))));
$result = $this->Form->input('city', array('error' => array('attributes' => array('escape' => false))));
$this->assertRegExp('/required<br>/', $result);
}

Expand Down Expand Up @@ -8428,7 +8428,7 @@ public function testMultiRecordForm() {
);
$this->assertTags($result, $expected);

$result = $this->Form->input('ValidateProfile.1.ValidateItem.2.created',array('empty' => true));
$result = $this->Form->input('ValidateProfile.1.ValidateItem.2.created', array('empty' => true));
$expected = array(
'div' => array('class' => 'input date'),
'label' => array('for' => 'ValidateProfile1ValidateItem2CreatedMonth'),
Expand Down

0 comments on commit 97c2cb3

Please sign in to comment.