Merge "Block: Expose list of block types as constant"

This commit is contained in:
jenkins-bot 2022-08-29 17:59:42 +00:00 committed by Gerrit Code Review
commit 8b1d70f771

View file

@ -47,6 +47,17 @@ interface Block extends WikiAwareEntity {
public const TYPE_AUTO = 4; public const TYPE_AUTO = 4;
public const TYPE_ID = 5; public const TYPE_ID = 5;
/**
* Map block types to strings, to allow convenient logging.
*/
public const BLOCK_TYPES = [
self::TYPE_USER => 'user',
self::TYPE_IP => 'ip',
self::TYPE_RANGE => 'range',
self::TYPE_AUTO => 'autoblock',
self::TYPE_ID => 'id',
];
/** /**
* Get the block ID * Get the block ID
* *