From 5741ac1828830557d50a127b1d8ef65b74aacd28 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Thu, 22 Nov 2012 10:02:36 +0100 Subject: [PATCH] add type hinting to dispatch filters --- lib/Cake/Routing/DispatcherFilter.php | 4 ++-- lib/Cake/Routing/Filter/AssetDispatcher.php | 4 ++-- lib/Cake/Routing/Filter/CacheDispatcher.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Routing/DispatcherFilter.php b/lib/Cake/Routing/DispatcherFilter.php index cf6f4fa51..386cc01bd 100644 --- a/lib/Cake/Routing/DispatcherFilter.php +++ b/lib/Cake/Routing/DispatcherFilter.php @@ -66,7 +66,7 @@ abstract class DispatcherFilter implements CakeEventListener { * keys in the data property. * @return CakeResponse|boolean **/ - public function beforeDispatch($event) { + public function beforeDispatch(CakeEvent $event) { } /** @@ -81,6 +81,6 @@ abstract class DispatcherFilter implements CakeEventListener { * 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) { } } diff --git a/lib/Cake/Routing/Filter/AssetDispatcher.php b/lib/Cake/Routing/Filter/AssetDispatcher.php index 24aff7cd0..96ac235b3 100644 --- a/lib/Cake/Routing/Filter/AssetDispatcher.php +++ b/lib/Cake/Routing/Filter/AssetDispatcher.php @@ -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; @@ -77,7 +77,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 */ - protected function _filterAsset($event) { + protected function _filterAsset(CakeEvent $event) { $url = $event->data['request']->url; $response = $event->data['response']; $filters = Configure::read('Asset.filter'); diff --git a/lib/Cake/Routing/Filter/CacheDispatcher.php b/lib/Cake/Routing/Filter/CacheDispatcher.php index 908d77a4a..0bc305d89 100644 --- a/lib/Cake/Routing/Filter/CacheDispatcher.php +++ b/lib/Cake/Routing/Filter/CacheDispatcher.php @@ -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; }