Merge "WebInstallerOutput: Add getLanguage()"
[lhc/web/wiklou.git] / includes / Block.php
index ec8cae8..7138301 100644 (file)
@@ -1132,6 +1132,7 @@ class Block {
         * prohibited from editing any page on the site (other than their own talk
         * page).
         *
+        * @since 1.33
         * @param null|bool $x
         * @return bool
         */
@@ -1306,7 +1307,7 @@ class Block {
         * @since 1.22
         */
        public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
-               if ( !count( $ipChain ) ) {
+               if ( $ipChain === [] ) {
                        return [];
                }
 
@@ -1331,7 +1332,7 @@ class Block {
                        $conds[] = self::getRangeCond( IP::toHex( $ipaddr ) );
                }
 
-               if ( !count( $conds ) ) {
+               if ( $conds === [] ) {
                        return [];
                }
 
@@ -1387,7 +1388,7 @@ class Block {
         * @return Block|null The "best" block from the list
         */
        public static function chooseBlock( array $blocks, array $ipChain ) {
-               if ( !count( $blocks ) ) {
+               if ( $blocks === [] ) {
                        return null;
                } elseif ( count( $blocks ) == 1 ) {
                        return $blocks[0];
@@ -1728,6 +1729,7 @@ class Block {
        /**
         * Get block information used in different block error messages
         *
+        * @since 1.33
         * @param IContextSource $context
         * @return array
         */
@@ -1769,6 +1771,7 @@ class Block {
         * Getting the restrictions will perform a database query if the restrictions
         * are not already loaded.
         *
+        * @since 1.33
         * @return Restriction[]
         */
        public function getRestrictions() {
@@ -1787,8 +1790,8 @@ class Block {
        /**
         * Set Restrictions.
         *
+        * @since 1.33
         * @param Restriction[] $restrictions
-        *
         * @return self
         */
        public function setRestrictions( array $restrictions ) {