mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
add type hinting to dispatch filters
This commit is contained in:
parent
5870d71e84
commit
5741ac1828
3 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue