Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Remove unneeded sprintf.
Fix doc blocks.
Remove duplicated keys in tests assertions.
Use boolean value for CakeRequest $parseEnvironment param.
  • Loading branch information
majna committed Dec 28, 2012
1 parent 5551727 commit 6d75d90
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions lib/Cake/Configure/PhpReader.php
Expand Up @@ -70,9 +70,7 @@ public function read($key) {

include $file;
if (!isset($config)) {
throw new ConfigureException(
sprintf(__d('cake_dev', 'No variable $config found in %s'), $file)
);
throw new ConfigureException(__d('cake_dev', 'No variable $config found in %s', $file));
}
return $config;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component.php
Expand Up @@ -135,7 +135,7 @@ public function beforeRender(Controller $controller) {
*
* @param Controller $controller Controller with components to shutdown
* @return void
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
*/
public function shutdown(Controller $controller) {
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -2959,7 +2959,7 @@ public function index($model) {
/**
* Generate a database-native schema for the given Schema object
*
* @param Model $schema An instance of a subclass of CakeSchema
* @param CakeSchema $schema An instance of a subclass of CakeSchema
* @param string $tableName Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
Expand Up @@ -93,7 +93,6 @@ public function testSettings() {
'persistent' => true,
'compress' => false,
'engine' => 'Memcache',
'persistent' => true,
'groups' => array()
);
$this->assertEquals($expecting, $settings);
Expand Down
Expand Up @@ -155,7 +155,6 @@ public function testMapActionsSet() {
'create' => 'create',
'read' => 'read',
'index' => 'read',
'add' => 'create',
'edit' => 'update',
'view' => 'read',
'delete' => 'delete',
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Controller/ControllerTest.php
Expand Up @@ -1254,7 +1254,7 @@ public function testShutdownProcessIndirect() {
* @return void
*/
public function testPropertyBackwardsCompatibility() {
$request = new CakeRequest('posts/index', null);
$request = new CakeRequest('posts/index', false);
$request->addParams(array('controller' => 'posts', 'action' => 'index'));
$request->data = array('Post' => array('id' => 1));
$request->here = '/posts/index';
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Routing/RouterTest.php
Expand Up @@ -1315,7 +1315,7 @@ public function testExtensionParsing() {
$this->assertEquals($expected, $result);

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

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

0 comments on commit 6d75d90

Please sign in to comment.