Ensure that User::getId() returns int
authorSiebrand Mazeland <siebrand@kitano.nl>
Fri, 18 Mar 2016 13:23:40 +0000 (14:23 +0100)
committerSiebrand Mazeland <siebrand@kitano.nl>
Fri, 18 Mar 2016 13:23:40 +0000 (14:23 +0100)
And document User::mId as such.

Change-Id: I65a5a284257da50830675f074f890f27701900e0

includes/user/User.php

index 09124bf..3a891f6 100644 (file)
@@ -200,6 +200,7 @@ class User implements IDBAccessObject {
 
        /** Cache variables */
        // @{
+       /** @var int */
        public $mId;
        /** @var string */
        public $mName;
@@ -2052,7 +2053,8 @@ class User implements IDBAccessObject {
                        // Don't load if this was initialized from an ID
                        $this->load();
                }
-               return $this->mId;
+
+               return (int)$this->mId;
        }
 
        /**