Skip to content

Commit

Permalink
add type hinting to dispatch filters
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Nov 22, 2012
1 parent 5870d71 commit 5741ac1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Routing/DispatcherFilter.php
Expand Up @@ -66,7 +66,7 @@ public function implementedEvents() {
* keys in the data property.
* @return CakeResponse|boolean
**/
public function beforeDispatch($event) {
public function beforeDispatch(CakeEvent $event) {
}

/**
Expand All @@ -81,6 +81,6 @@ public function beforeDispatch($event) {
* keys in the data property.
* @return mixed boolean to stop the event dispatching or null to continue
**/
public function afterDispatch($event) {
public function afterDispatch(CakeEvent $event) {
}
}
4 changes: 2 additions & 2 deletions lib/Cake/Routing/Filter/AssetDispatcher.php
Expand Up @@ -40,7 +40,7 @@ class AssetDispatcher extends DispatcherFilter {
* @param CakeEvent $event containing the request and response object
* @return CakeResponse if the client is requesting a recognized asset, null otherwise
*/
public function beforeDispatch($event) {
public function beforeDispatch(CakeEvent $event) {
$url = $event->data['request']->url;
if (strpos($url, '..') !== false || strpos($url, '.') === false) {
return;
Expand Down Expand Up @@ -77,7 +77,7 @@ public function beforeDispatch($event) {
* @param CakeEvent $event containing the request and response object
* @return CakeResponse if the client is requesting a recognized asset, null otherwise
*/
protected function _filterAsset($event) {
protected function _filterAsset(CakeEvent $event) {
$url = $event->data['request']->url;
$response = $event->data['response'];
$filters = Configure::read('Asset.filter');
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Filter/CacheDispatcher.php
Expand Up @@ -36,7 +36,7 @@ class CacheDispatcher extends DispatcherFilter {
* @param CakeEvent $event containing the request and response object
* @return CakeResponse with cached content if found, null otherwise
*/
public function beforeDispatch($event) {
public function beforeDispatch(CakeEvent $event) {
if (Configure::read('Cache.check') !== true) {
return;
}
Expand Down

0 comments on commit 5741ac1

Please sign in to comment.