jenkins-bot has submitted this change and it was merged.
Change subject: add Hooks::TYPE_BOOL (v 3.5.2)
......................................................................
add Hooks::TYPE_BOOL (v 3.5.2)
Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83
---
M PhpTags.php
M includes/GenericObject.php
M includes/Hooks.php
3 files changed, 7 insertions(+), 1 deletion(-)
Approvals:
Pastakhov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/PhpTags.php b/PhpTags.php
index fc1c717..3f9138d 100644
--- a/PhpTags.php
+++ b/PhpTags.php
@@ -17,7 +17,7 @@
const PHPTAGS_MAJOR_VERSION = 3;
const PHPTAGS_MINOR_VERSION = 5;
-const PHPTAGS_RELEASE_VERSION = 1;
+const PHPTAGS_RELEASE_VERSION = 2;
define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION
. '.' . PHPTAGS_RELEASE_VERSION );
const PHPTAGS_HOOK_RELEASE = 5;
diff --git a/includes/GenericObject.php b/includes/GenericObject.php
index cde0168..bfda318 100644
--- a/includes/GenericObject.php
+++ b/includes/GenericObject.php
@@ -168,11 +168,16 @@
$error =
'scalar';
break 2;
}
+ break;
case Hooks::TYPE_NOT_OBJECT:
if ( true ===
is_object( $arguments[$i] ) ) {
$error = 'not
object';
break 2;
}
+ break;
+ case Hooks::TYPE_BOOL:
+ $arguments[$i] =
(bool)$arguments[$i];
+ break;
}
} elseif ( false === $arguments[$i] instanceof
GenericObject || $arguments[$i]->name != $expects[$i] ) {
$error = $expects[$i];
diff --git a/includes/Hooks.php b/includes/Hooks.php
index e8c7c7f..1c190ed 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -24,6 +24,7 @@
const TYPE_INT = 7;
const TYPE_FLOAT = 8;
const TYPE_NOT_OBJECT = 9;
+ const TYPE_BOOL = 10;
/**
* When accessing static objects, the object name is placed here.
--
To view, visit https://gerrit.wikimedia.org/r/168944
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic077b19a600298d824b69db2ff6a4d2fe6d4ad83
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PhpTags
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <[email protected]>
Gerrit-Reviewer: Pastakhov <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits