original_string: function getUserGroupIndex(Userinfo $userinfo)
  	{
  		$index = 0;
  
  		$master = Framework::getMaster();
  		if ($master) {
  			$mastergroups = Groups::get($master->name);
  
  			foreach ($mastergroups as $key => $mastergroup) {
  				if ($mastergroup) {
  					if (count($mastergroup) == count($userinfo->groups)) {
  						$count = 0;
  						foreach ($mastergroup as $value) {
  							if (in_array($value, $userinfo->groups, true)) {
  								$count++;
  							}
  						}
  						if (count($userinfo->groups) == $count) {
  							$index = $key;
  							break;
  						}
  					}
  				}
  			}
  		}
  		return $index;
  	}
code: function getUserGroupIndex(Userinfo $userinfo)
  	{
  		$index = 0;
  
  		$master = Framework::getMaster();
  		if ($master) {
  			$mastergroups = Groups::get($master->name);
  
  			foreach ($mastergroups as $key => $mastergroup) {
  				if ($mastergroup) {
  					if (count($mastergroup) == count($userinfo->groups)) {
  						$count = 0;
  						foreach ($mastergroup as $value) {
  							if (in_array($value, $userinfo->groups, true)) {
  								$count++;
  							}
  						}
  						if (count($userinfo->groups) == $count) {
  							$index = $key;
  							break;
  						}
  					}
  				}
  			}
  		}
  		return $index;
  	}
code_tokens: function getUserGroupIndex ( Userinfo $ userinfo ) { $ index = 0 ; $ master = Framework :: getMaster ( ) ; if ( $ master ) { $ mastergroups = Groups :: get ( $ master -> name ) ; foreach ( $ mastergroups as $ key => $ mastergroup ) { if ( $ mastergroup ) { if ( count ( $ mastergroup ) == count ( $ userinfo -> groups ) ) { $ count = 0 ; foreach ( $ mastergroup as $ value ) { if ( in_array ( $ value , $ userinfo -> groups , true ) ) { $ count ++ ; } } if ( count ( $ userinfo -> groups ) == $ count ) { $ index = $ key ; break ; } } } } } return $ index ; }
docstring: Function That find the correct user group index
  
  @param Userinfo $userinfo
  
  @return int
docstring_tokens: Function That find the correct user group index