EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/113385

Change subject: Cleanup all undefined class analysis warnings
......................................................................

Cleanup all undefined class analysis warnings

Change-Id: I953aafdd211bb790f0ae69ac986c920c30e3c830
---
M includes/Block/Block.php
M includes/Block/Header.php
M includes/Container.php
M includes/Data/MultiDimArray.php
M includes/Data/UserNameBatch.php
M includes/Formatter/AbstractFormatter.php
M includes/Model/UUID.php
M includes/Notifications/Controller.php
M includes/Notifications/Formatter.php
M includes/SpamFilter/AbuseFilter.php
M includes/Template/ErrorHelper.php
M includes/Templating.php
M includes/View/Post.php
13 files changed, 22 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/85/113385/1

diff --git a/includes/Block/Block.php b/includes/Block/Block.php
index bd635cf..0eea288 100644
--- a/includes/Block/Block.php
+++ b/includes/Block/Block.php
@@ -3,7 +3,6 @@
 namespace Flow\Block;
 
 use Flow\Model\Workflow;
-use Flow\Model\Post;
 use Flow\NotificationController;
 use Flow\Data\ManagerGroup;
 use Flow\Templating;
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 50ebb16..fcd286f 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -10,7 +10,6 @@
 use Flow\Data\ObjectManager;
 use Flow\Model\Workflow;
 use Flow\Model\Header;
-use Flow\Repository\HeaderRepository;
 use Flow\Templating;
 use User;
 use Flow\Exception\InvalidActionException;
diff --git a/includes/Container.php b/includes/Container.php
index 3ace465..8dad01f 100644
--- a/includes/Container.php
+++ b/includes/Container.php
@@ -12,7 +12,7 @@
         *  special page or API module), there is a good chance that your code
         *  requires refactoring
         *
-        * @return Flow\Container
+        * @return Container
         */
        public static function getContainer() {
                static $container;
diff --git a/includes/Data/MultiDimArray.php b/includes/Data/MultiDimArray.php
index 3271281..984e958 100644
--- a/includes/Data/MultiDimArray.php
+++ b/includes/Data/MultiDimArray.php
@@ -3,6 +3,8 @@
 namespace Flow\Data;
 
 use Flow\Exception\InvalidInputException;
+use RecursiveArrayIterator;
+use RecursiveIteratorIterator;
 
 /**
  * This object can be used to easily set keys in a multi-dimensional array.
@@ -123,7 +125,7 @@
        public function add( $query, $position ) {
                $dim = count( (array) $position );
                if ( $dim !== $this->dimensions ) {
-                       throw new \InvalidInputException( "Expection position 
with {$this->dimensions} dimensions, received $dim", 'invalid-input' );
+                       throw new InvalidInputException( "Expection position 
with {$this->dimensions} dimensions, received $dim", 'invalid-input' );
                }
                $query = ObjectManager::splitFromRow( $query, $this->queryKeys 
);
                if ( $query === null ) {
diff --git a/includes/Data/UserNameBatch.php b/includes/Data/UserNameBatch.php
index 86ba77d..ef11235 100644
--- a/includes/Data/UserNameBatch.php
+++ b/includes/Data/UserNameBatch.php
@@ -183,7 +183,7 @@
        /**
         * @param string $wiki wiki id
         * @param array $userIds List of user ids to lookup
-        * @return bool|ResultWrapper Containing objects with user_id and
+        * @return bool|\ResultWrapper Containing objects with user_id and
         *   user_name properies.
         */
        function execute( $wiki, array $userIds );
diff --git a/includes/Formatter/AbstractFormatter.php 
b/includes/Formatter/AbstractFormatter.php
index 088cdc0..1b09955 100644
--- a/includes/Formatter/AbstractFormatter.php
+++ b/includes/Formatter/AbstractFormatter.php
@@ -3,6 +3,7 @@
 namespace Flow\Formatter;
 
 use Flow\Block\AbstractBlock;
+use Flow\Container;
 use Flow\Data\ManagerGroup;
 use Flow\FlowActions;
 use Flow\Model\AbstractRevision;
@@ -161,7 +162,7 @@
        /**
         * @param AbstractRevision $revision
         * @param User $user
-        * @param Lang $lang
+        * @param Language $lang
         * @return array Contains [timeAndDate, date, time]
         */
        protected function getDateFormats( AbstractRevision $revision, User 
$user, Language $lang ) {
diff --git a/includes/Model/UUID.php b/includes/Model/UUID.php
index 5797897..385d04f 100644
--- a/includes/Model/UUID.php
+++ b/includes/Model/UUID.php
@@ -4,6 +4,8 @@
 
 use Flow\Data\ObjectManager;
 use Flow\Exception\InvalidInputException;
+use User;
+use Language;
 
 class UUID {
        // provided binary UUID
diff --git a/includes/Notifications/Controller.php 
b/includes/Notifications/Controller.php
index daad3f2..6274e87 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -251,7 +251,7 @@
         * owner of the talk page
         * @param  array $mentions Array of User objects
         * @param  PostRevision $post The Post that is being examined.
-        * @param  Title $title The Title of the page that the comment is made 
on.
+        * @param  \Title $title The Title of the page that the comment is made 
on.
         * @return array Array of user IDs
         */
        protected function filterMentionedUsers( $mentions, PostRevision $post, 
$title ) {
diff --git a/includes/Notifications/Formatter.php 
b/includes/Notifications/Formatter.php
index bd941ae..c38f961 100644
--- a/includes/Notifications/Formatter.php
+++ b/includes/Notifications/Formatter.php
@@ -20,7 +20,7 @@
                        }
                } elseif ( $param === 'commentText' ) {
                        /**
-                        * @var $wgLang Language
+                        * @var \Language $wgLang
                         */
                        global $wgLang; // Message::language is protected :(
 
@@ -69,10 +69,10 @@
        /**
         * Helper function for getLink()
         *
-        * @param EchoEvent $event
-        * @param User $user The user receiving the notification
-        * @param String $destination The destination type for the link
-        * @return Array including target and query parameters
+        * @param \EchoEvent $event
+        * @param \User $user The user receiving the notification
+        * @param string $destination The destination type for the link
+        * @return array including target and query parameters
         */
        protected function getLinkParams( $event, $user, $destination ) {
                $target = null;
diff --git a/includes/SpamFilter/AbuseFilter.php 
b/includes/SpamFilter/AbuseFilter.php
index 4f0c466..1e89d36 100644
--- a/includes/SpamFilter/AbuseFilter.php
+++ b/includes/SpamFilter/AbuseFilter.php
@@ -112,7 +112,7 @@
                return array(
                        /**
                         * @param string $method: Method to generate the 
variable
-                        * @param AbuseFilterVariableHolder $vars
+                        * @param \AbuseFilterVariableHolder $vars
                         * @param array $parameters Parameters with data to 
compute the value
                         * @param mixed &$result Result of the computation
                         */
diff --git a/includes/Template/ErrorHelper.php 
b/includes/Template/ErrorHelper.php
index 0441d2e..a044470 100644
--- a/includes/Template/ErrorHelper.php
+++ b/includes/Template/ErrorHelper.php
@@ -7,7 +7,7 @@
        /**
         * Generic error output for block errors
         *
-        * @param Block $block
+        * @param \Flow\Block\Block $block
         * @return HtmlString
         */
        public function block( $block ) {
diff --git a/includes/Templating.php b/includes/Templating.php
index b9cd500..a6665fe 100644
--- a/includes/Templating.php
+++ b/includes/Templating.php
@@ -13,6 +13,7 @@
 use Html;
 use Linker;
 use LinkBatch;
+use Message;
 use MWTimestamp;
 use RequestContext;
 use User;
@@ -51,7 +52,7 @@
        protected $globals;
 
        /**
-        * @var Redlinks
+        * @var Redlinker
         */
        protected $redlinks;
 
@@ -258,7 +259,7 @@
                        return $cache[$userId][$userText];
                }
 
-               if ( $userText instanceof MWMessage ) {
+               if ( $userText instanceof Message ) {
                        // username was moderated away, we dont know who this is
                        $res = '';
                } else {
diff --git a/includes/View/Post.php b/includes/View/Post.php
index 5c24f8f..18ea356 100644
--- a/includes/View/Post.php
+++ b/includes/View/Post.php
@@ -9,6 +9,7 @@
 use Flow\Templating;
 use Linker;
 use Html;
+use Message;
 use User;
 
 class Post {
@@ -89,7 +90,7 @@
        }
 
        public function userToolLinks( $userId, $userText ) {
-               if ( $userText instanceof MWMessage ) {
+               if ( $userText instanceof Message ) {
                        // username was moderated away, we dont know who this is
                        return '';
                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/113385
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I953aafdd211bb790f0ae69ac986c920c30e3c830
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to