Fix coding standards errors.

This commit is contained in:
mark_story 2012-04-23 22:01:45 -04:00
parent b6de177ffa
commit 7240286adc
4 changed files with 23 additions and 33 deletions

View file

@ -44,7 +44,7 @@ class Dispatcher implements CakeEventListener {
* Event manager, used to handle dispatcher filters
*
* @var CakeEventMaanger
**/
*/
protected $_eventManager;
/**
@ -63,7 +63,7 @@ class Dispatcher implements CakeEventListener {
* creted. Attaches the default listeners and filters
*
* @return CakeEventmanger
**/
*/
public function getEventManager() {
if (!$this->_eventManager) {
$this->_eventManager = new CakeEventManager();
@ -77,7 +77,7 @@ class Dispatcher implements CakeEventListener {
* Returns the list of events this object listents to.
*
* @return array
**/
*/
public function implementedEvents() {
return array('Dispatcher.beforeDispatch' => 'parseParams');
}
@ -88,7 +88,8 @@ class Dispatcher implements CakeEventListener {
*
* @param CakeEventManager $manager
* @return void
**/
* @throws MissingDispatcherFilterException
*/
protected function _attachFilters($manager) {
$filters = Configure::read('Dispatcher.filters');
if (empty($filters)) {

View file

@ -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');
@ -31,7 +27,7 @@ class CacheDispatcher extends DispatcherFilter {
* This filter should run before the request gets parsed by router
*
* @var int
**/
*/
public $priority = 9;
/**
@ -68,4 +64,4 @@ class CacheDispatcher extends DispatcherFilter {
}
}
}
}

View file

@ -48,7 +48,7 @@ class TestDispatcher extends Dispatcher {
* Controller instance, made publicly available for testing
*
* @var Controller
**/
*/
public $controller;
/**
@ -68,7 +68,7 @@ class TestDispatcher extends Dispatcher {
*
* @param CakeEvent
* @return void
**/
*/
public function filterTest($event) {
$event->data['request']->params['eventName'] = $event->name();
}
@ -78,7 +78,7 @@ class TestDispatcher extends Dispatcher {
*
* @param CakeEvent
* @return void
**/
*/
public function filterTest2($event) {
$event->stopPropagation();
return $event->data['response'];
@ -783,7 +783,6 @@ class DispatcherTest extends CakeTestCase {
$Dispatcher->dispatch($url, $response, array('return' => 1));
}
/**
* testDispatch method
*
@ -1194,7 +1193,7 @@ class DispatcherTest extends CakeTestCase {
* 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),
@ -1234,7 +1233,7 @@ class DispatcherTest extends CakeTestCase {
*
* @expectedException MissingDispatcherFilterException
* @return void
**/
*/
public function testDispatcherFilterSuscriberMissing() {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
@ -1250,12 +1249,11 @@ class DispatcherTest extends CakeTestCase {
$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)
@ -1513,7 +1511,6 @@ class DispatcherTest extends CakeTestCase {
$this->assertEquals('404', $response->statusCode());
}
/**
* Data provider for cached actions.
*

View file

@ -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
@ -41,7 +37,7 @@ class AssetDispatcherTest extends CakeTestCase {
$filter = new AssetDispatcher();
$response = $this->getMock('CakeResponse', array('_sendHeader'));
Configure::write('Asset.filter', array(
'js' => '',
'js' => '',
'css' => ''
));
App::build(array(
@ -85,11 +81,11 @@ class AssetDispatcherTest extends CakeTestCase {
* file dispatching
*
* @return void
**/
*/
public function testNotModified() {
$filter = new AssetDispatcher();
Configure::write('Asset.filter', array(
'js' => '',
'js' => '',
'css' => ''
));
App::build(array(
@ -125,4 +121,4 @@ class AssetDispatcherTest extends CakeTestCase {
$this->assertSame($response, $filter->beforeDispatch($event));
$this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());
}
}
}