From 6be34f1814d691023d1454aa47204f6be93d23df Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 26 Feb 2015 01:20:09 +0100 Subject: [PATCH] Safely added more type-hints. Signed-off-by: Roland Haeder --- plugins/AnonymousFave/AnonymousFavePlugin.php | 2 +- plugins/Blacklist/BlacklistPlugin.php | 6 +++--- plugins/CasAuthentication/CasAuthenticationPlugin.php | 6 +++--- plugins/FacebookBridge/FacebookBridgePlugin.php | 2 +- plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php | 4 ++-- plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 2 +- plugins/Minify/MinifyPlugin.php | 2 +- plugins/OpenID/OpenIDPlugin.php | 4 ++-- plugins/TwitterBridge/TwitterBridgePlugin.php | 2 +- plugins/WebFinger/WebFingerPlugin.php | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/AnonymousFave/AnonymousFavePlugin.php b/plugins/AnonymousFave/AnonymousFavePlugin.php index 7d2f29c568..6ff1cb19de 100644 --- a/plugins/AnonymousFave/AnonymousFavePlugin.php +++ b/plugins/AnonymousFave/AnonymousFavePlugin.php @@ -100,7 +100,7 @@ class AnonymousFavePlugin extends Plugin $action->inlineScript('SN.U.NoticeFavor();'); } - function onStartInitializeRouter($m) + function onStartInitializeRouter(URLMapper $m) { $m->connect('main/anonfavor', array('action' => 'AnonFavor')); $m->connect('main/anondisfavor', array('action' => 'AnonDisFavor')); diff --git a/plugins/Blacklist/BlacklistPlugin.php b/plugins/Blacklist/BlacklistPlugin.php index bad89f2457..dde3a513ad 100644 --- a/plugins/Blacklist/BlacklistPlugin.php +++ b/plugins/Blacklist/BlacklistPlugin.php @@ -433,17 +433,17 @@ class BlacklistPlugin extends Plugin return $hostname; } - function onStartHandleFeedEntry($activity) + function onStartHandleFeedEntry(Activity $activity) { return $this->_checkActivity($activity); } - function onStartHandleSalmon($activity) + function onStartHandleSalmon(Activity $activity) { return $this->_checkActivity($activity); } - function _checkActivity($activity) + function _checkActivity(Activity $activity) { $actor = $activity->actor; diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 461655264e..16d5c20add 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -68,13 +68,13 @@ class CasAuthenticationPlugin extends AuthenticationPlugin } } - function onStartInitializeRouter($m) + function onStartInitializeRouter(URLMapper $m) { $m->connect('main/cas', array('action' => 'caslogin')); return true; } - function onEndLoginGroupNav($action) + function onEndLoginGroupNav(Action $action) { $action_name = $action->trimmed('action'); @@ -88,7 +88,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin return true; } - function onEndShowPageNotice($action) + function onEndShowPageNotice(Action $action) { $name = $action->trimmed('action'); diff --git a/plugins/FacebookBridge/FacebookBridgePlugin.php b/plugins/FacebookBridge/FacebookBridgePlugin.php index 9618eee31c..23b175bcff 100644 --- a/plugins/FacebookBridge/FacebookBridgePlugin.php +++ b/plugins/FacebookBridge/FacebookBridgePlugin.php @@ -190,7 +190,7 @@ class FacebookBridgePlugin extends Plugin * * @return void */ - function onEndLoginGroupNav($action) + function onEndLoginGroupNav(Action $action) { $action_name = $action->trimmed('action'); diff --git a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php index 906509fef5..2d03fe2afc 100644 --- a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php +++ b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php @@ -84,7 +84,7 @@ class GNUsocialPhotosPlugin extends Plugin } - function onStartHandleFeedEntry($activity) + function onStartHandleFeedEntry(Activity $activity) { common_log(LOG_INFO, 'photo plugin: onEndAtomPubNewActivity'); $oprofile = Ostatus_profile::ensureActorProfile($activity); @@ -121,7 +121,7 @@ class GNUsocialPhotosPlugin extends Plugin return true; } - function onStartShowNoticeItem($action) + function onStartShowNoticeItem(Action $action) { $photo = GNUsocialPhoto::getKV('notice_id', $action->notice->id); if($photo) { diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index 0efaec99b2..8eeb1004b0 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -58,7 +58,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin return parent::onAutoload($cls); } - function onEndShowPageNotice($action) + function onEndShowPageNotice(Action $action) { $name = $action->trimmed('action'); $instr = false; diff --git a/plugins/Minify/MinifyPlugin.php b/plugins/Minify/MinifyPlugin.php index cb51e980f3..e2d6c87674 100644 --- a/plugins/Minify/MinifyPlugin.php +++ b/plugins/Minify/MinifyPlugin.php @@ -51,7 +51,7 @@ class MinifyPlugin extends Plugin * * @return boolean hook return */ - function onStartInitializeRouter($m) + function onStartInitializeRouter(URLMapper $m) { $m->connect('main/min', array('action' => 'minify')); diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 74a7ef5463..5cd71e6e17 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -273,7 +273,7 @@ class OpenIDPlugin extends Plugin * * @return boolean hook return */ - function onEndLoginGroupNav($action) + function onEndLoginGroupNav(Action $action) { $this->showOpenIDLoginTab($action); @@ -453,7 +453,7 @@ class OpenIDPlugin extends Plugin * * @return boolean hook value */ - function onEndShowPageNotice($action) + function onEndShowPageNotice(Action $action) { $name = $action->trimmed('action'); diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 8b90e77029..9252fd17a5 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -143,7 +143,7 @@ class TwitterBridgePlugin extends Plugin * * @return void */ - function onEndLoginGroupNav($action) + function onEndLoginGroupNav(Action $action) { $action_name = $action->trimmed('action'); diff --git a/plugins/WebFinger/WebFingerPlugin.php b/plugins/WebFinger/WebFingerPlugin.php index fda40fcbda..dff3c86bc1 100644 --- a/plugins/WebFinger/WebFingerPlugin.php +++ b/plugins/WebFinger/WebFingerPlugin.php @@ -38,7 +38,7 @@ class WebFingerPlugin extends Plugin common_config_set('webfinger', 'http_alias', $this->http_alias); } - public function onRouterInitialized($m) + public function onRouterInitialized(URLMapper $m) { $m->connect('.well-known/host-meta', array('action' => 'hostmeta')); $m->connect('.well-known/host-meta.:format', -- 2.39.5