Code Duplication    Length = 9-9 lines in 2 locations

includes/user/User.php 2 locations

@@ 3505-3513 (lines=9) @@
3502
	 * @param string ... Permissions to test
3503
	 * @return bool True if user is allowed to perform *any* of the given actions
3504
	 */
3505
	public function isAllowedAny() {
3506
		$permissions = func_get_args();
3507
		foreach ( $permissions as $permission ) {
3508
			if ( $this->isAllowed( $permission ) ) {
3509
				return true;
3510
			}
3511
		}
3512
		return false;
3513
	}
3514
3515
	/**
3516
	 *
@@ 3520-3528 (lines=9) @@
3517
	 * @param string ... Permissions to test
3518
	 * @return bool True if the user is allowed to perform *all* of the given actions
3519
	 */
3520
	public function isAllowedAll() {
3521
		$permissions = func_get_args();
3522
		foreach ( $permissions as $permission ) {
3523
			if ( !$this->isAllowed( $permission ) ) {
3524
				return false;
3525
			}
3526
		}
3527
		return true;
3528
	}
3529
3530
	/**
3531
	 * Internal mechanics of testing a permission