Add @since tags to new public methods related to partial blocks
authorThalia <thalia.e.chan@googlemail.com>
Tue, 8 Jan 2019 12:44:33 +0000 (12:44 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Tue, 8 Jan 2019 12:44:33 +0000 (12:44 +0000)
Bug: T210369
Change-Id: I20197ceee8e5e43fac20addc494b841519b915c8

includes/Block.php
includes/block/BlockRestriction.php
includes/block/Restriction/AbstractRestriction.php
includes/block/Restriction/PageRestriction.php
includes/block/Restriction/Restriction.php
includes/user/User.php

index ec8cae8..fb3caf6 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
         */
@@ -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 ) {
index 5bf286d..5fe9650 100644 (file)
@@ -32,6 +32,7 @@ class BlockRestriction {
        /**
         * Retrieves the restrictions from the database by block id.
         *
+        * @since 1.33
         * @param int|array $blockId
         * @param IDatabase|null $db
         * @return Restriction[]
@@ -58,6 +59,7 @@ class BlockRestriction {
        /**
         * Inserts the restrictions into the database.
         *
+        * @since 1.33
         * @param Restriction[] $restrictions
         * @return bool
         */
@@ -92,6 +94,7 @@ class BlockRestriction {
         * Updates the list of restrictions. This method does not allow removing all
         * of the restrictions. To do that, use ::deleteByBlockId().
         *
+        * @since 1.33
         * @param Restriction[] $restrictions
         * @return bool
         */
@@ -156,6 +159,7 @@ class BlockRestriction {
        /**
         * Updates the list of restrictions by parent id.
         *
+        * @since 1.33
         * @param int $parentBlockId
         * @param Restriction[] $restrictions
         * @return bool
@@ -195,6 +199,7 @@ class BlockRestriction {
        /**
         * Delete the restrictions.
         *
+        * @since 1.33
         * @param Restriction[]|null $restrictions
         * @throws MWException
         * @return bool
@@ -224,6 +229,7 @@ class BlockRestriction {
        /**
         * Delete the restrictions by Block ID.
         *
+        * @since 1.33
         * @param int|array $blockId
         * @throws MWException
         * @return bool
@@ -240,6 +246,7 @@ class BlockRestriction {
        /**
         * Delete the restrictions by Parent Block ID.
         *
+        * @since 1.33
         * @param int|array $parentBlockId
         * @throws MWException
         * @return bool
@@ -261,6 +268,7 @@ class BlockRestriction {
         * equality check as the restrictions do not have to contain the same block
         * ids.
         *
+        * @since 1.33
         * @param Restriction[] $a
         * @param Restriction[] $b
         * @return bool
@@ -305,6 +313,7 @@ class BlockRestriction {
        /**
         * Set the blockId on a set of restrictions and return a new set.
         *
+        * @since 1.33
         * @param int $blockId
         * @param Restriction[] $restrictions
         * @return Restriction[]
index 88a6a0f..8c3e27f 100644 (file)
@@ -37,6 +37,7 @@ abstract class AbstractRestriction implements Restriction {
        /**
         * Create Restriction.
         *
+        * @since 1.33
         * @param int $blockId
         * @param int $value
         */
index 209b148..b72baea 100644 (file)
@@ -56,6 +56,7 @@ class PageRestriction extends AbstractRestriction {
        /**
         * Set the title.
         *
+        * @since 1.33
         * @param \Title $title
         * @return self
         */
@@ -68,6 +69,7 @@ class PageRestriction extends AbstractRestriction {
        /**
         * Get Title.
         *
+        * @since 1.33
         * @return \Title|null
         */
        public function getTitle() {
index 5fefecc..a89ca38 100644 (file)
@@ -27,6 +27,7 @@ interface Restriction {
        /**
         * Gets the id of the block.
         *
+        * @since 1.33
         * @return int
         */
        public function getBlockId();
@@ -34,6 +35,7 @@ interface Restriction {
        /**
         * Sets the id of the block.
         *
+        * @since 1.33
         * @param int $blockId
         * @return self
         */
@@ -42,6 +44,7 @@ interface Restriction {
        /**
         * Gets the value of the restriction.
         *
+        * @since 1.33
         * @return int
         */
        public function getValue();
@@ -49,6 +52,7 @@ interface Restriction {
        /**
         * Gets the type of restriction
         *
+        * @since 1.33
         * @return string
         */
        public function getType();
@@ -56,6 +60,7 @@ interface Restriction {
        /**
         * Gets the id of the type of restriction. This id is used in the database.
         *
+        * @since 1.33
         * @return string
         */
        public function getTypeId();
@@ -63,6 +68,7 @@ interface Restriction {
        /**
         * Creates a new Restriction from a database row.
         *
+        * @since 1.33
         * @param \stdClass $row
         * @return self
         */
@@ -71,6 +77,7 @@ interface Restriction {
        /**
         * Convert a restriction object into a row array for insertion.
         *
+        * @since 1.33
         * @return array
         */
        public function toRow();
@@ -78,6 +85,7 @@ interface Restriction {
        /**
         * Determine if a restriction matches a given title.
         *
+        * @since 1.33
         * @param \Title $title
         * @return bool
         */
@@ -86,6 +94,7 @@ interface Restriction {
        /**
         * Determine if a restriction equals another restriction.
         *
+        * @since 1.33
         * @param Restriction $other
         * @return bool
         */
@@ -94,6 +103,7 @@ interface Restriction {
        /**
         * Create a unique hash of the block restriction based on the type and value.
         *
+        * @since 1.33
         * @return string
         */
        public function getHash();
index 22fe44c..d334ef0 100644 (file)
@@ -4543,6 +4543,7 @@ class User implements IDBAccessObject, UserIdentity {
        /**
         * Get whether the user is blocked from using Special:Upload
         *
+        * @since 1.33
         * @return bool
         */
        public function isBlockedFromUpload() {