From: Thalia Date: Thu, 29 Aug 2019 12:18:50 +0000 (+0100) Subject: Improve formatting of constructor documentation for block classes X-Git-Tag: 1.34.0-rc.0~488^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=4c4b61c1265ebaa8455f0457327c5495bdebfcc7;p=lhc%2Fweb%2Fwiklou.git Improve formatting of constructor documentation for block classes Change-Id: Idced6ce907f63d2c041d1bb926b8224ece54c3de --- diff --git a/includes/block/AbstractBlock.php b/includes/block/AbstractBlock.php index fcc624e6c3..4d4bb07dc5 100644 --- a/includes/block/AbstractBlock.php +++ b/includes/block/AbstractBlock.php @@ -90,13 +90,13 @@ abstract class AbstractBlock { /** * Create a new block with specified parameters on a user, IP or IP range. * - * @param array $options Parameters of the block: - * address string|User Target user name, User object, IP address or IP range - * by int User ID of the blocker - * reason string Reason of the block - * timestamp string The time at which the block comes into effect - * byText string Username of the blocker (for foreign users) - * hideName bool Hide the target user name + * @param array $options Parameters of the block, with supported options: + * - address: (string|User) Target user name, User object, IP address or IP range + * - by: (int) User ID of the blocker + * - reason: (string) Reason of the block + * - timestamp: (string) The time at which the block comes into effect + * - byText: (string) Username of the blocker (for foreign users) + * - hideName: (bool) Hide the target user name */ public function __construct( array $options = [] ) { $defaults = [ diff --git a/includes/block/CompositeBlock.php b/includes/block/CompositeBlock.php index 45a630149c..3f3e2d3a5a 100644 --- a/includes/block/CompositeBlock.php +++ b/includes/block/CompositeBlock.php @@ -40,8 +40,9 @@ class CompositeBlock extends AbstractBlock { /** * Create a new block with specified parameters on a user, IP or IP range. * - * @param array $options Parameters of the block: - * originalBlocks Block[] Blocks that this block is composed from + * @param array $options Parameters of the block, with options supported by + * `AbstractBlock::__construct`, and also: + * - originalBlocks: (Block[]) Blocks that this block is composed from */ public function __construct( array $options = [] ) { parent::__construct( $options ); diff --git a/includes/block/DatabaseBlock.php b/includes/block/DatabaseBlock.php index 79286c5acf..6007abdf41 100644 --- a/includes/block/DatabaseBlock.php +++ b/includes/block/DatabaseBlock.php @@ -86,18 +86,18 @@ class DatabaseBlock extends AbstractBlock { /** * Create a new block with specified option parameters on a user, IP or IP range. * - * @param array $options Parameters of the block: - * user int Override target user ID (for foreign users) - * auto bool Is this an automatic block? - * expiry string Timestamp of expiration of the block or 'infinity' - * anonOnly bool Only disallow anonymous actions - * createAccount bool Disallow creation of new accounts - * enableAutoblock bool Enable automatic blocking - * blockEmail bool Disallow sending emails - * allowUsertalk bool Allow the target to edit its own talk page - * sitewide bool Disallow editing all pages and all contribution - * actions, except those specifically allowed by - * other block flags + * @param array $options Parameters of the block, with options supported by + * `AbstractBlock::__construct`, and also: + * - user: (int) Override target user ID (for foreign users) + * - auto: (bool) Is this an automatic block? + * - expiry: (string) Timestamp of expiration of the block or 'infinity' + * - anonOnly: (bool) Only disallow anonymous actions + * - createAccount: (bool) Disallow creation of new accounts + * - enableAutoblock: (bool) Enable automatic blocking + * - blockEmail: (bool) Disallow sending emails + * - allowUsertalk: (bool) Allow the target to edit its own talk page + * - sitewide: (bool) Disallow editing all pages and all contribution actions, + * except those specifically allowed by other block flags * * @since 1.26 $options array */ diff --git a/includes/block/SystemBlock.php b/includes/block/SystemBlock.php index 0cbf12508b..494a7b9ba2 100644 --- a/includes/block/SystemBlock.php +++ b/includes/block/SystemBlock.php @@ -39,11 +39,11 @@ class SystemBlock extends AbstractBlock { /** * Create a new block with specified parameters on a user, IP or IP range. * - * @param array $options Parameters of the block: - * systemBlock string Indicate that this block is automatically - * created by MediaWiki rather than being stored - * in the database. Value is a string to return - * from self::getSystemBlockType(). + * @param array $options Parameters of the block, with options supported by + * `AbstractBlock::__construct`, and also: + * - systemBlock: (string) Indicate that this block is automatically created by + * MediaWiki rather than being stored in the database. Value is a string to + * return from self::getSystemBlockType(). */ public function __construct( array $options = [] ) { parent::__construct( $options );