From: Roland Haeder Date: Sun, 8 Mar 2015 23:34:40 +0000 (+0100) Subject: Added more checked type-hints. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ca8df301dfe944e90f48cd1abeed0bad8585301;p=quix0rs-gnu-social.git Added more checked type-hints. Signed-off-by: Roland Haeder --- diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index ce7e1df831..60f108dee3 100644 --- a/actions/blockedfromgroup.php +++ b/actions/blockedfromgroup.php @@ -151,7 +151,7 @@ class GroupBlockList extends ProfileList $this->group = $group; } - function newListItem($profile) + function newListItem(Profile $profile) { return new GroupBlockListItem($profile, $this->group, $this->action); } diff --git a/actions/groupqueue.php b/actions/groupqueue.php index e3e719f38a..060b5a2e7d 100644 --- a/actions/groupqueue.php +++ b/actions/groupqueue.php @@ -153,7 +153,7 @@ class GroupqueueAction extends GroupAction // @todo FIXME: documentation missing. class GroupQueueList extends GroupMemberList { - function newListItem($profile) + function newListItem(Profile $profile) { return new GroupQueueListItem($profile, $this->group, $this->action); } diff --git a/actions/noticesearch.php b/actions/noticesearch.php index b4401ee17b..f1d6d15516 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -186,7 +186,7 @@ class SearchNoticeList extends NoticeList { $this->terms = $terms; } - function newListItem($notice) + function newListItem(Notice $notice) { return new SearchNoticeListItem($notice, $this->out, $this->terms); } diff --git a/actions/peopletagged.php b/actions/peopletagged.php index d547866a3c..98e0cd7125 100644 --- a/actions/peopletagged.php +++ b/actions/peopletagged.php @@ -167,7 +167,7 @@ class PeopletagMemberList extends ProfileList $this->peopletag = $peopletag; } - function newListItem($profile) + function newListItem(Profile $profile) { return new PeopletagMemberListItem($profile, $this->peopletag, $this->action); } diff --git a/actions/peopletagsubscribers.php b/actions/peopletagsubscribers.php index 73057a38ed..dcb3af5c9f 100644 --- a/actions/peopletagsubscribers.php +++ b/actions/peopletagsubscribers.php @@ -167,7 +167,7 @@ class PeopletagSubscriberList extends ProfileList $this->peopletag = $peopletag; } - function newListItem($profile) + function newListItem(Profile $profile) { return new PeopletagSubscriberListItem($profile, $this->peopletag, $this->action); } diff --git a/actions/selftag.php b/actions/selftag.php index b886c3d9f7..58f0460997 100644 --- a/actions/selftag.php +++ b/actions/selftag.php @@ -158,7 +158,7 @@ class SelftagAction extends Action class SelfTagProfileList extends ProfileList { - function newListItem($profile) + function newListItem(Profile $profile) { return new SelfTagProfileListItem($profile, $this->action); } diff --git a/actions/showstream.php b/actions/showstream.php index 7c38eca14a..a3c461915a 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -310,7 +310,7 @@ class ShowstreamAction extends ProfileAction */ class ProfileNoticeList extends NoticeList { - function newListItem($notice) + function newListItem(Notice $notice) { return new ProfileNoticeListItem($notice, $this->out); } diff --git a/actions/subqueue.php b/actions/subqueue.php index ba47345600..c87202ddf1 100644 --- a/actions/subqueue.php +++ b/actions/subqueue.php @@ -106,7 +106,7 @@ class SubqueueAction extends GalleryAction class SubQueueList extends ProfileList { - function newListItem($profile) + function newListItem(Profile $profile) { return new SubQueueListItem($profile, $this->action); } diff --git a/actions/subscribers.php b/actions/subscribers.php index 2724927878..682faf869e 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -135,7 +135,7 @@ class SubscribersAction extends GalleryAction class SubscribersList extends SubscriptionList { - function newListItem($profile) + function newListItem(Profile $profile) { return new SubscribersListItem($profile, $this->owner, $this->action); } diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 231a697230..39f794a045 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -161,7 +161,7 @@ class SubscriptionsAction extends GalleryAction class SubscriptionsList extends SubscriptionList { - function newListItem($profile) + function newListItem(Profile $profile) { return new SubscriptionsListItem($profile, $this->owner, $this->action); } diff --git a/lib/fullthreadednoticelist.php b/lib/fullthreadednoticelist.php index 52b5f279c9..0cc023ca5d 100644 --- a/lib/fullthreadednoticelist.php +++ b/lib/fullthreadednoticelist.php @@ -48,7 +48,7 @@ if (!defined('STATUSNET')) { class FullThreadedNoticeList extends ThreadedNoticeList { - function newListItem($notice) + function newListItem(Notice $notice) { return new FullThreadedNoticeListItem($notice, $this->out, $this->userProfile); } diff --git a/lib/groupaction.php b/lib/groupaction.php index 5d11e6acdd..b1a5d77197 100644 --- a/lib/groupaction.php +++ b/lib/groupaction.php @@ -325,7 +325,7 @@ class GroupAdminSection extends ProfileSection class GroupMembersMiniList extends ProfileMiniList { - function newListItem($profile) + function newListItem(Profile $profile) { return new GroupMembersMiniListItem($profile, $this->action); } @@ -347,7 +347,7 @@ class GroupMembersMiniListItem extends ProfileMiniListItem class GroupBlockedMiniList extends ProfileMiniList { - function newListItem($profile) + function newListItem(Profile $profile) { return new GroupBlockedMiniListItem($profile, $this->action); } diff --git a/lib/groupmemberlist.php b/lib/groupmemberlist.php index ba608213a4..f055e24731 100644 --- a/lib/groupmemberlist.php +++ b/lib/groupmemberlist.php @@ -12,7 +12,7 @@ class GroupMemberList extends ProfileList $this->group = $group; } - function newListItem($profile) + function newListItem(Profile $profile) { return new GroupMemberListItem($profile, $this->group, $this->action); } diff --git a/lib/pluginlist.php b/lib/pluginlist.php index 51c02aa245..40a889abd5 100644 --- a/lib/pluginlist.php +++ b/lib/pluginlist.php @@ -78,7 +78,7 @@ class PluginList extends Widget } } - function newListItem($plugin) + function newListItem(Plugin $plugin) { return new PluginListItem($plugin, $this->out); } diff --git a/lib/profileaction.php b/lib/profileaction.php index f7119a3ea0..79008f3bfc 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -345,7 +345,7 @@ class ProfileAction extends ManagedAction class SubscribersMiniList extends ProfileMiniList { - function newListItem($profile) + function newListItem(Profile $profile) { return new SubscribersMiniListItem($profile, $this->action); } diff --git a/lib/profilelist.php b/lib/profilelist.php index 767e12bc25..57559b5bb2 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -97,7 +97,7 @@ class ProfileList extends Widget return $cnt; } - function newListItem($profile) + function newListItem(Profile $profile) { return new ProfileListItem($profile, $this->action); } diff --git a/lib/profileminilist.php b/lib/profileminilist.php index 33624a3c70..9c10d62b18 100644 --- a/lib/profileminilist.php +++ b/lib/profileminilist.php @@ -54,7 +54,7 @@ class ProfileMiniList extends ProfileList $this->out->elementStart('ul', 'entities users xoxo'); } - function newListItem($profile) + function newListItem(Profile $profile) { return new ProfileMiniListItem($profile, $this->action); } diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index 29c1274407..f882b90c7f 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -53,7 +53,7 @@ class SubscriptionList extends ProfileList $this->owner = $owner; } - function newListItem($profile) + function newListItem(Profile $profile) { return new SubscriptionListItem($profile, $this->owner, $this->action); } diff --git a/plugins/Adsense/AdsensePlugin.php b/plugins/Adsense/AdsensePlugin.php index 78ad2f2b82..80d90facaa 100644 --- a/plugins/Adsense/AdsensePlugin.php +++ b/plugins/Adsense/AdsensePlugin.php @@ -174,7 +174,7 @@ class AdsensePlugin extends UAPPlugin return true; } - function onEndAdminPanelNav($menu) { + function onEndAdminPanelNav(Menu $menu) { if (AdminPanelAction::canAdmin('adsense')) { // TRANS: Menu item title/tooltip $menu_title = _m('AdSense configuration'); diff --git a/plugins/BitlyUrl/BitlyUrlPlugin.php b/plugins/BitlyUrl/BitlyUrlPlugin.php index 13a1bf2ec4..3b6474dd86 100644 --- a/plugins/BitlyUrl/BitlyUrlPlugin.php +++ b/plugins/BitlyUrl/BitlyUrlPlugin.php @@ -188,7 +188,7 @@ class BitlyUrlPlugin extends UrlShortenerPlugin /** * Add the bit.ly admin panel to the list... */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('bitly')) { $action_name = $nav->action->trimmed('action'); diff --git a/plugins/Blacklist/BlacklistPlugin.php b/plugins/Blacklist/BlacklistPlugin.php index bad89f2457..c223049781 100644 --- a/plugins/Blacklist/BlacklistPlugin.php +++ b/plugins/Blacklist/BlacklistPlugin.php @@ -330,7 +330,7 @@ class BlacklistPlugin extends Plugin * * @return boolean hook value */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('blacklist')) { @@ -348,7 +348,7 @@ class BlacklistPlugin extends Plugin return true; } - function onEndDeleteUserForm($action, $user) + function onEndDeleteUserForm(Action $action, User $user) { $cur = common_current_user(); @@ -386,7 +386,7 @@ class BlacklistPlugin extends Plugin $action->elementEnd('ul'); } - function onEndDeleteUser($action, $user) + function onEndDeleteUser(Action $action, User $user) { if ($action->boolean('blacklisthomepage')) { $pattern = $action->trimmed('blacklisthomepagepattern'); @@ -401,7 +401,7 @@ class BlacklistPlugin extends Plugin return true; } - function checkboxAndText($action, $checkID, $label, $textID, $value) + private function checkboxAndText(Action $action, $checkID, $label, $textID, $value) { $action->element('input', array('name' => $checkID, 'type' => 'checkbox', diff --git a/plugins/ConversationTree/lib/conversationtree.php b/plugins/ConversationTree/lib/conversationtree.php index 144902fce2..ff39b3e4f4 100644 --- a/plugins/ConversationTree/lib/conversationtree.php +++ b/plugins/ConversationTree/lib/conversationtree.php @@ -140,7 +140,7 @@ class ConversationTree extends NoticeList * * @return NoticeListItem a list item to show */ - function newListItem($notice) + function newListItem(Notice $notice) { return new ConversationTreeItem($notice, $this->out); } diff --git a/plugins/Directory/lib/sortablegrouplist.php b/plugins/Directory/lib/sortablegrouplist.php index 8bd7e1bd70..756b078416 100644 --- a/plugins/Directory/lib/sortablegrouplist.php +++ b/plugins/Directory/lib/sortablegrouplist.php @@ -119,7 +119,7 @@ class SortableGroupList extends SortableSubscriptionList $this->out->elementStart('tbody'); } - function newListItem($profile, $odd) + function newListItem(Profile $profile, $odd) { return new SortableGroupListItem($profile, $this->owner, $this->action, $odd); } diff --git a/plugins/Directory/lib/sortablesubscriptionlist.php b/plugins/Directory/lib/sortablesubscriptionlist.php index 75c42a5fdf..7e9c310358 100644 --- a/plugins/Directory/lib/sortablesubscriptionlist.php +++ b/plugins/Directory/lib/sortablesubscriptionlist.php @@ -151,7 +151,7 @@ class SortableSubscriptionList extends SubscriptionList return $cnt; } - function newListItem($profile, $odd) + function newListItem(Profile $profile, $odd) { return new SortableSubscriptionListItem($profile, $this->owner, $this->action, $odd); } diff --git a/plugins/FacebookBridge/FacebookBridgePlugin.php b/plugins/FacebookBridge/FacebookBridgePlugin.php index 9618eee31c..83170396d2 100644 --- a/plugins/FacebookBridge/FacebookBridgePlugin.php +++ b/plugins/FacebookBridge/FacebookBridgePlugin.php @@ -229,7 +229,7 @@ class FacebookBridgePlugin extends Plugin * * @return boolean hook value */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('facebook')) { diff --git a/plugins/Favorite/actions/showfavorites.php b/plugins/Favorite/actions/showfavorites.php index 3d797353ca..0734ab9865 100644 --- a/plugins/Favorite/actions/showfavorites.php +++ b/plugins/Favorite/actions/showfavorites.php @@ -245,7 +245,7 @@ class ShowfavoritesAction extends Action class FavoritesNoticeList extends NoticeList { - function newListItem($notice) + function newListItem(Notice $notice) { return new FavoritesNoticeListItem($notice, $this->out); } diff --git a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php index fcf7e87366..9d8d4acb12 100644 --- a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php +++ b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php @@ -112,7 +112,7 @@ class GNUsocialProfileExtensionsPlugin extends Plugin $action->script('plugins/GNUsocialProfileExtensions/js/profile.js'); } - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('profilefields')) { diff --git a/plugins/GNUsocialProfileExtensions/lib/noticetree.php b/plugins/GNUsocialProfileExtensions/lib/noticetree.php index 95df528388..380672ebb5 100644 --- a/plugins/GNUsocialProfileExtensions/lib/noticetree.php +++ b/plugins/GNUsocialProfileExtensions/lib/noticetree.php @@ -103,7 +103,7 @@ class NoticeTree extends NoticeList $this->out->elementEnd('li'); } - function newListItem($notice) + function newListItem(Notice $notice) { return new NoticeTreeItem($notice, $this->out); } diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 7568af4960..ec2e6a85d3 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -592,7 +592,7 @@ class OpenIDPlugin extends Plugin * * @return boolean hook value */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('openid')) { diff --git a/plugins/OpenX/OpenXPlugin.php b/plugins/OpenX/OpenXPlugin.php index 69e45f2b79..1d2b9d53e8 100644 --- a/plugins/OpenX/OpenXPlugin.php +++ b/plugins/OpenX/OpenXPlugin.php @@ -181,7 +181,7 @@ ENDOFSCRIPT; return true; } - function onEndAdminPanelNav($menu) { + function onEndAdminPanelNav(Menu $menu) { if (AdminPanelAction::canAdmin('openx')) { // TRANS: Menu item title. $menu_title = _m('OpenX configuration.'); diff --git a/plugins/SearchSub/actions/searchsubs.php b/plugins/SearchSub/actions/searchsubs.php index 54563ed0e7..99879319dc 100644 --- a/plugins/SearchSub/actions/searchsubs.php +++ b/plugins/SearchSub/actions/searchsubs.php @@ -140,7 +140,7 @@ class SearchSubsAction extends GalleryAction class SearchSubscriptionsList extends SubscriptionList { - function newListItem($searchsub) + function newListItem(SearchSub $searchsub) { return new SearchSubscriptionsListItem($searchsub, $this->owner, $this->action); } diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index a1fe90b4b4..bab0d9fa9b 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -154,7 +154,7 @@ class SitemapPlugin extends Plugin return true; } - function onEndAdminPanelNav($menu) { + function onEndAdminPanelNav(Menu $menu) { if (AdminPanelAction::canAdmin('sitemap')) { // TRANS: Menu item title/tooltip $menu_title = _m('Sitemap configuration'); diff --git a/plugins/TagSub/actions/tagsubs.php b/plugins/TagSub/actions/tagsubs.php index be195250f6..12d15aa620 100644 --- a/plugins/TagSub/actions/tagsubs.php +++ b/plugins/TagSub/actions/tagsubs.php @@ -140,7 +140,7 @@ class TagSubsAction extends GalleryAction class TagSubscriptionsList extends SubscriptionList { - function newListItem($tagsub) + function newListItem(TagSub $tagsub) { return new TagSubscriptionsListItem($tagsub, $this->owner, $this->action); } diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 8b90e77029..d4bb74e935 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -270,7 +270,7 @@ class TwitterBridgePlugin extends Plugin * @return boolean hook value */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('twitter')) { diff --git a/plugins/UserFlag/actions/adminprofileflag.php b/plugins/UserFlag/actions/adminprofileflag.php index 4ba69bcc63..8a7d478631 100644 --- a/plugins/UserFlag/actions/adminprofileflag.php +++ b/plugins/UserFlag/actions/adminprofileflag.php @@ -200,7 +200,7 @@ class FlaggedProfileList extends ProfileList * * @return ProfileListItem newly-created item */ - function newListItem($profile) + function newListItem(Profile $profile) { return new FlaggedProfileListItem($this->profile, $this->action); }