Code Duplication    Length = 8-9 lines in 2 locations

includes/specials/SpecialUserrights.php 2 locations

@@ 729-737 (lines=9) @@
726
	 * @param string $group The name of the group to check
727
	 * @return bool Can we remove the group?
728
	 */
729
	private function canRemove( $group ) {
730
		// $this->changeableGroups()['remove'] doesn't work, of course. Thanks, PHP.
731
		$groups = $this->changeableGroups();
732
733
		return in_array(
734
			$group,
735
			$groups['remove'] ) || ( $this->isself && in_array( $group, $groups['remove-self'] )
736
		);
737
	}
738
739
	/**
740
	 * @param string $group The name of the group to check
@@ 743-750 (lines=8) @@
740
	 * @param string $group The name of the group to check
741
	 * @return bool Can we add the group?
742
	 */
743
	private function canAdd( $group ) {
744
		$groups = $this->changeableGroups();
745
746
		return in_array(
747
			$group,
748
			$groups['add'] ) || ( $this->isself && in_array( $group, $groups['add-self'] )
749
		);
750
	}
751
752
	/**
753
	 * Returns $this->getUser()->changeableGroups()