aboutsummaryrefslogtreecommitdiffstats
path: root/includes/title/Hook
diff options
context:
space:
mode:
authorapaskulin <apaskulin@wikimedia.org>2020-03-16 16:31:05 -0700
committerTim Starling <tstarling@wikimedia.org>2020-04-21 09:10:08 +1000
commitc44488f72549331733ef261b90058fd73d7badde (patch)
tree91ac013c191dbab31525b506083ccb0b37ce3a57 /includes/title/Hook
parentf5aaf75ad15813bfeb93dcb4e5fbaaa52b23c7fe (diff)
downloadmediawikicore-c44488f72549331733ef261b90058fd73d7badde.tar.gz
mediawikicore-c44488f72549331733ef261b90058fd73d7badde.zip
docs: Hook interface doc comment review
Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
Diffstat (limited to 'includes/title/Hook')
-rw-r--r--includes/title/Hook/CanonicalNamespacesHook.php5
-rw-r--r--includes/title/Hook/NamespaceIsMovableHook.php6
2 files changed, 5 insertions, 6 deletions
diff --git a/includes/title/Hook/CanonicalNamespacesHook.php b/includes/title/Hook/CanonicalNamespacesHook.php
index 6b79b32403f3..bd7262018152 100644
--- a/includes/title/Hook/CanonicalNamespacesHook.php
+++ b/includes/title/Hook/CanonicalNamespacesHook.php
@@ -8,8 +8,7 @@ namespace MediaWiki\Hook;
*/
interface CanonicalNamespacesHook {
/**
- * For extensions adding their own namespaces or altering
- * the defaults.
+ * Use this hook to add namespaces or alter the defaults.
* Note that if you need to specify namespace protection or content model for
* a namespace that is added in a CanonicalNamespaces hook handler, you
* should do so by altering $wgNamespaceProtection and
@@ -21,7 +20,7 @@ interface CanonicalNamespacesHook {
*
* @since 1.35
*
- * @param ?mixed &$namespaces Array of namespace numbers with corresponding canonical names
+ * @param array &$namespaces Array of namespace numbers with corresponding canonical names
* @return bool|void True or no return value to continue or false to abort
*/
public function onCanonicalNamespaces( &$namespaces );
diff --git a/includes/title/Hook/NamespaceIsMovableHook.php b/includes/title/Hook/NamespaceIsMovableHook.php
index a0aa526c61fc..ef53f47418cd 100644
--- a/includes/title/Hook/NamespaceIsMovableHook.php
+++ b/includes/title/Hook/NamespaceIsMovableHook.php
@@ -8,13 +8,13 @@ namespace MediaWiki\Hook;
*/
interface NamespaceIsMovableHook {
/**
- * Called when determining if it is possible to pages in a
+ * This hook is called when determining if it is possible to move pages in a
* namespace.
*
* @since 1.35
*
- * @param ?mixed $index Integer; the index of the namespace being checked.
- * @param ?mixed &$result Boolean; whether MediaWiki currently thinks that pages in this
+ * @param int $index Index of the namespace being checked
+ * @param bool &$result Whether MediaWiki currently thinks that pages in this
* namespace are movable. Hooks may change this value to override the return
* value of NamespaceInfo::isMovable().
* @return bool|void True or no return value to continue or false to abort