浏览代码

Fix coding standards errors.

mark_story 14 年之前
父节点
当前提交
7240286adc

+ 5 - 4
lib/Cake/Routing/Dispatcher.php

@@ -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)) {

+ 6 - 10
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');
@@ -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 {
 		}
 	}
 
-}
+}

+ 6 - 9
lib/Cake/Test/Case/Routing/DispatcherTest.php

@@ -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.
  *

+ 6 - 10
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
@@ -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());
 	}
-}
+}