Merge "ApiBase: Always validate that 'limit' is numeric"
[lhc/web/wiklou.git] / includes / session / SessionInfo.php
index 287da9d..882eb39 100644 (file)
@@ -50,10 +50,19 @@ class SessionInfo {
        /** @var UserInfo|null */
        private $userInfo = null;
 
+       /** @var bool */
        private $persisted = false;
+
+       /** @var bool */
        private $remembered = false;
+
+       /** @var bool */
        private $forceHTTPS = false;
+
+       /** @var bool */
        private $idIsSafe = false;
+
+       /** @var bool */
        private $forceUse = false;
 
        /** @var array|null */
@@ -147,6 +156,7 @@ class SessionInfo {
                        $this->idIsSafe = $data['idIsSafe'];
                        $this->forceUse = $data['forceUse'] && $this->provider;
                } else {
+                       // @phan-suppress-next-line PhanUndeclaredMethod
                        $this->id = $this->provider->getManager()->generateSessionId();
                        $this->idIsSafe = true;
                        $this->forceUse = false;
@@ -282,7 +292,7 @@ class SessionInfo {
         * @return int Negative if $a < $b, positive if $a > $b, zero if equal
         */
        public static function compare( $a, $b ) {
-               return $a->getPriority() - $b->getPriority();
+               return $a->getPriority() <=> $b->getPriority();
        }
 
 }