dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use real variargs for variadic methods
[lhc/web/wiklou.git]
/
includes
/
user
/
User.php
diff --git
a/includes/user/User.php
b/includes/user/User.php
index
fc96fe1
..
2679e87
100644
(file)
--- a/
includes/user/User.php
+++ b/
includes/user/User.php
@@
-3554,27
+3554,25
@@
class User implements IDBAccessObject, UserIdentity {
* @deprecated since 1.34, use MediaWikiServices::getInstance()
* ->getPermissionManager()->userHasAnyRights(...) instead
*
* @deprecated since 1.34, use MediaWikiServices::getInstance()
* ->getPermissionManager()->userHasAnyRights(...) instead
*
- * @param string
$permissions,...
Permissions to test
+ * @param string
...$permissions
Permissions to test
* @return bool True if user is allowed to perform *any* of the given actions
* @return bool True if user is allowed to perform *any* of the given actions
- * @suppress PhanCommentParamOnEmptyParamList Cannot make variadic due to HHVM bug, T191668#5263929
*/
*/
- public function isAllowedAny() {
+ public function isAllowedAny(
...$permissions
) {
return MediaWikiServices::getInstance()
->getPermissionManager()
return MediaWikiServices::getInstance()
->getPermissionManager()
- ->userHasAnyRight( $this, ...
func_get_args()
);
+ ->userHasAnyRight( $this, ...
$permissions
);
}
/**
* @deprecated since 1.34, use MediaWikiServices::getInstance()
* ->getPermissionManager()->userHasAllRights(...) instead
}
/**
* @deprecated since 1.34, use MediaWikiServices::getInstance()
* ->getPermissionManager()->userHasAllRights(...) instead
- * @param string
$permissions,...
Permissions to test
+ * @param string
...$permissions
Permissions to test
* @return bool True if the user is allowed to perform *all* of the given actions
* @return bool True if the user is allowed to perform *all* of the given actions
- * @suppress PhanCommentParamOnEmptyParamList Cannot make variadic due to HHVM bug, T191668#5263929
*/
*/
- public function isAllowedAll() {
+ public function isAllowedAll(
...$permissions
) {
return MediaWikiServices::getInstance()
->getPermissionManager()
return MediaWikiServices::getInstance()
->getPermissionManager()
- ->userHasAllRights( $this, ...
func_get_args()
);
+ ->userHasAllRights( $this, ...
$permissions
);
}
/**
}
/**