Added type-hint (checked!)
authorRoland Haeder <roland@mxchange.org>
Sat, 12 Sep 2015 06:36:56 +0000 (08:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 12 Sep 2015 06:36:56 +0000 (08:36 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/attachmentlist.php
lib/command.php
lib/noticelist.php
lib/peopletaglist.php
lib/pluginlist.php
lib/threadednoticelist.php

index a784066fdadf78b413051a53682e82e1b11062c5..19ca5711c8c2ab7e3eff437d5e8cd050f8d79623 100644 (file)
@@ -58,7 +58,7 @@ class AttachmentList extends Widget
      *
      * @param Notice $notice stream of notices from DB_DataObject
      */
-    function __construct($notice, $out=null)
+    function __construct(Notice $notice, Action $out=null)
     {
         parent::__construct($out);
         $this->notice = $notice;
index 830b97ee239e9d8ba693efb3aa7f3ebf1b5cde4a..4b7f1c4f7e283beabd020ca5434d9a9885d792c9 100644 (file)
@@ -795,7 +795,7 @@ class SubscriptionsCommand extends Command
             $out .= ' ';
             $out .= implode(', ',$nicknames);
         }
-        $channel->output($this->user,$out);
+        $channel->output($this->user, $out);
     }
 }
 
@@ -822,7 +822,7 @@ class SubscribersCommand extends Command
             $out .= ' ';
             $out .= implode(', ',$nicknames);
         }
-        $channel->output($this->user,$out);
+        $channel->output($this->user, $out);
     }
 }
 
@@ -848,7 +848,7 @@ class GroupsCommand extends Command
                 count($nicknames));
             $out.=implode(', ',$groups);
         }
-        $channel->output($this->user,$out);
+        $channel->output($this->user, $out);
     }
 }
 
index 727be89bc6d0da56effbe0c05bd9e176d323639d..317c7a3f03b8d3e290e9922e6901519f0c0fcf7b 100644 (file)
@@ -65,7 +65,7 @@ class NoticeList extends Widget
      *
      * @param Notice $notice stream of notices from DB_DataObject
      */
-    function __construct(Notice $notice, $out=null, array $prefs=array())
+    function __construct(Notice $notice, Action $out=null, array $prefs=array())
     {
         parent::__construct($out);
         $this->notice = $notice;
index b2f2dcca463753c2766de08dda9834505b81e911..d8d4b6db69365d4efee507afc9c196c66c74e5f4 100644 (file)
@@ -102,7 +102,7 @@ class PeopletagListItem extends Widget
      *
      * @param Notice $notice The notice we'll display
      */
-    function __construct($peopletag, $current, $out=null)
+    function __construct($peopletag, $current, Action $out=null)
     {
         parent::__construct($out);
         $this->peopletag  = $peopletag;
index 40a889abd5b63ee899223ddd3e54b1e24ae1d305..038b08a18fdc8e9a1fb625366fb92953b40cd20c 100644 (file)
@@ -31,8 +31,8 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require INSTALLDIR . "/lib/pluginenableform.php";
-require INSTALLDIR . "/lib/plugindisableform.php";
+require INSTALLDIR . '/lib/pluginenableform.php';
+require INSTALLDIR . '/lib/plugindisableform.php';
 
 /**
  * Plugin list
@@ -47,7 +47,7 @@ class PluginList extends Widget
 {
     var $plugins = array();
 
-    function __construct($plugins, $out)
+    function __construct(array $plugins, Action $out=null)
     {
         parent::__construct($out);
         $this->plugins = $plugins;
@@ -73,6 +73,9 @@ class PluginList extends Widget
     function showPlugins()
     {
         foreach ($this->plugins as $plugin) {
+            // Some check on instance
+            assert($plugin instanceof Plugin);
+
             $pli = $this->newListItem($plugin);
             $pli->show();
         }
@@ -92,7 +95,7 @@ class PluginListItem extends Widget
     /** Local cache for plugin version info */
     protected static $versions = false;
 
-    function __construct($plugin, $out)
+    function __construct($plugin, Action $out=null)
     {
         parent::__construct($out);
         $this->plugin = $plugin;
index ebf0a460897069db61f43398e403e5905ee3b932..7f938df46ef50b85628ddec5983e83308d6e0d35 100644 (file)
@@ -261,7 +261,7 @@ class ThreadedNoticeListSubItem extends NoticeListItem
 {
     protected $root = null;
 
-    function __construct(Notice $notice, $root, $out)
+    function __construct(Notice $notice, $root, Action $out=null)
     {
         $this->root = $root;
         parent::__construct($notice, $out);