Skip to content

Commit

Permalink
Fix coding standards errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 24, 2012
1 parent b6de177 commit 7240286
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 33 deletions.
9 changes: 5 additions & 4 deletions lib/Cake/Routing/Dispatcher.php
Expand Up @@ -44,7 +44,7 @@ class Dispatcher implements CakeEventListener {
* Event manager, used to handle dispatcher filters
*
* @var CakeEventMaanger
**/
*/
protected $_eventManager;

/**
Expand All @@ -63,7 +63,7 @@ public function __construct($base = false) {
* creted. Attaches the default listeners and filters
*
* @return CakeEventmanger
**/
*/
public function getEventManager() {
if (!$this->_eventManager) {
$this->_eventManager = new CakeEventManager();
Expand All @@ -77,7 +77,7 @@ public function getEventManager() {
* Returns the list of events this object listents to.
*
* @return array
**/
*/
public function implementedEvents() {
return array('Dispatcher.beforeDispatch' => 'parseParams');
}
Expand All @@ -88,7 +88,8 @@ public function implementedEvents() {
*
* @param CakeEventManager $manager
* @return void
**/
* @throws MissingDispatcherFilterException
*/
protected function _attachFilters($manager) {
$filters = Configure::read('Dispatcher.filters');
if (empty($filters)) {
Expand Down
16 changes: 6 additions & 10 deletions lib/Cake/Routing/Filter/CacheDispatcher.php
@@ -1,19 +1,15 @@
<?php
/**
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Routing
* @since CakePHP(tm) v 2.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since CakePHP(tm) v 2.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

App::uses('DispatcherFilter', 'Routing');
Expand All @@ -31,7 +27,7 @@ class CacheDispatcher extends DispatcherFilter {
* This filter should run before the request gets parsed by router
*
* @var int
**/
*/
public $priority = 9;

/**
Expand Down Expand Up @@ -68,4 +64,4 @@ public function beforeDispatch($event) {
}
}

}
}
15 changes: 6 additions & 9 deletions lib/Cake/Test/Case/Routing/DispatcherTest.php
Expand Up @@ -48,7 +48,7 @@ class TestDispatcher extends Dispatcher {
* Controller instance, made publicly available for testing
*
* @var Controller
**/
*/
public $controller;

/**
Expand All @@ -68,7 +68,7 @@ protected function _invoke(Controller $controller, CakeRequest $request, CakeRes
*
* @param CakeEvent
* @return void
**/
*/
public function filterTest($event) {
$event->data['request']->params['eventName'] = $event->name();
}
Expand All @@ -78,7 +78,7 @@ public function filterTest($event) {
*
* @param CakeEvent
* @return void
**/
*/
public function filterTest2($event) {
$event->stopPropagation();
return $event->data['response'];
Expand Down Expand Up @@ -783,7 +783,6 @@ public function testMissingControllerAbstract() {
$Dispatcher->dispatch($url, $response, array('return' => 1));
}


/**
* testDispatch method
*
Expand Down Expand Up @@ -1194,7 +1193,7 @@ public function testTestPluginDispatch() {
* Tests that it is possible to attach filter classes to the dispatch cycle
*
* @return void
**/
*/
public function testDispatcherFilterSuscriber() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
Expand Down Expand Up @@ -1234,7 +1233,7 @@ public function testDispatcherFilterSuscriber() {
*
* @expectedException MissingDispatcherFilterException
* @return void
**/
*/
public function testDispatcherFilterSuscriberMissing() {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
Expand All @@ -1250,12 +1249,11 @@ public function testDispatcherFilterSuscriberMissing() {
$dispatcher->dispatch($request, $response);
}


/**
* Tests it is possible to attach single callables as filters
*
* @return void
**/
*/
public function testDispatcherFilterCallable() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
Expand Down Expand Up @@ -1513,7 +1511,6 @@ public function testMissingAssetProcessor404() {
$this->assertEquals('404', $response->statusCode());
}


/**
* Data provider for cached actions.
*
Expand Down
16 changes: 6 additions & 10 deletions lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php
@@ -1,14 +1,10 @@
<?php
/**
* RouterTest file
*
* PHP 5
*
* CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
Expand Down Expand Up @@ -41,7 +37,7 @@ public function testAssetFilterForThemeAndPlugins() {
$filter = new AssetDispatcher();
$response = $this->getMock('CakeResponse', array('_sendHeader'));
Configure::write('Asset.filter', array(
'js' => '',
'js' => '',
'css' => ''
));
App::build(array(
Expand Down Expand Up @@ -85,11 +81,11 @@ public function testAssetFilterForThemeAndPlugins() {
* file dispatching
*
* @return void
**/
*/
public function testNotModified() {
$filter = new AssetDispatcher();
Configure::write('Asset.filter', array(
'js' => '',
'js' => '',
'css' => ''
));
App::build(array(
Expand Down Expand Up @@ -125,4 +121,4 @@ public function testNotModified() {
$this->assertSame($response, $filter->beforeDispatch($event));
$this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());
}
}
}

0 comments on commit 7240286

Please sign in to comment.