Skip to content

Commit 6d75d90

Browse files
committed
Code cleanup
Remove unneeded sprintf. Fix doc blocks. Remove duplicated keys in tests assertions. Use boolean value for CakeRequest $parseEnvironment param.
1 parent 5551727 commit 6d75d90

File tree

7 files changed

+5
-9
lines changed

7 files changed

+5
-9
lines changed

lib/Cake/Configure/PhpReader.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ public function read($key) {
7070

7171
include $file;
7272
if (!isset($config)) {
73-
throw new ConfigureException(
74-
sprintf(__d('cake_dev', 'No variable $config found in %s'), $file)
75-
);
73+
throw new ConfigureException(__d('cake_dev', 'No variable $config found in %s', $file));
7674
}
7775
return $config;
7876
}

lib/Cake/Controller/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function beforeRender(Controller $controller) {
135135
*
136136
* @param Controller $controller Controller with components to shutdown
137137
* @return void
138-
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
138+
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
139139
*/
140140
public function shutdown(Controller $controller) {
141141
}

lib/Cake/Model/Datasource/DboSource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ public function index($model) {
29592959
/**
29602960
* Generate a database-native schema for the given Schema object
29612961
*
2962-
* @param Model $schema An instance of a subclass of CakeSchema
2962+
* @param CakeSchema $schema An instance of a subclass of CakeSchema
29632963
* @param string $tableName Optional. If specified only the table name given will be generated.
29642964
* Otherwise, all tables defined in the schema are generated.
29652965
* @return string

lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public function testSettings() {
9393
'persistent' => true,
9494
'compress' => false,
9595
'engine' => 'Memcache',
96-
'persistent' => true,
9796
'groups' => array()
9897
);
9998
$this->assertEquals($expecting, $settings);

lib/Cake/Test/Case/Controller/Component/Auth/CrudAuthorizeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ public function testMapActionsSet() {
155155
'create' => 'create',
156156
'read' => 'read',
157157
'index' => 'read',
158-
'add' => 'create',
159158
'edit' => 'update',
160159
'view' => 'read',
161160
'delete' => 'delete',

lib/Cake/Test/Case/Controller/ControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ public function testShutdownProcessIndirect() {
12541254
* @return void
12551255
*/
12561256
public function testPropertyBackwardsCompatibility() {
1257-
$request = new CakeRequest('posts/index', null);
1257+
$request = new CakeRequest('posts/index', false);
12581258
$request->addParams(array('controller' => 'posts', 'action' => 'index'));
12591259
$request->data = array('Post' => array('id' => 1));
12601260
$request->here = '/posts/index';

lib/Cake/Test/Case/Routing/RouterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ public function testExtensionParsing() {
13151315
$this->assertEquals($expected, $result);
13161316

13171317
$result = Router::parse('/posts/view/1.rss');
1318-
$expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'view', 'pass' => array('1'), 'named' => array(), 'ext' => 'rss', 'named' => array());
1318+
$expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'view', 'pass' => array('1'), 'named' => array(), 'ext' => 'rss');
13191319
$this->assertEquals($expected, $result);
13201320

13211321
$result = Router::parse('/posts/view/1.rss?query=test');

0 commit comments

Comments
 (0)