original_string: private function authenticateMenuEntries(Menu $menu, array $userRoles) {
  	
  		foreach($menu->getEntries() as $e) {
  	
  			if(!$e->getAuth()) {
  				$e->setAttribute('display', NULL);
  			}
  	
  			else {
  				$e->setAttribute('display', 'none');
  	
  				foreach($userRoles as $role) {
  						
  					if($e->isAuthenticatedByRole($role)) {
  						$e->setAttribute('display', NULL);
  						break;
  					}
  
  				}
  			}
  	
  		}
  	
  	}
code: private function authenticateMenuEntries(Menu $menu, array $userRoles) {
  	
  		foreach($menu->getEntries() as $e) {
  	
  			if(!$e->getAuth()) {
  				$e->setAttribute('display', NULL);
  			}
  	
  			else {
  				$e->setAttribute('display', 'none');
  	
  				foreach($userRoles as $role) {
  						
  					if($e->isAuthenticatedByRole($role)) {
  						$e->setAttribute('display', NULL);
  						break;
  					}
  
  				}
  			}
  	
  		}
  	
  	}
code_tokens: private function authenticateMenuEntries ( Menu $ menu , array $ userRoles ) { foreach ( $ menu -> getEntries ( ) as $ e ) { if ( ! $ e -> getAuth ( ) ) { $ e -> setAttribute ( 'display' , NULL ) ; } else { $ e -> setAttribute ( 'display' , 'none' ) ; foreach ( $ userRoles as $ role ) { if ( $ e -> isAuthenticatedByRole ( $ role ) ) { $ e -> setAttribute ( 'display' , NULL ) ; break ; } } } } }
docstring: authenticate menu entries by checking each one against the
  user's roles if necessary
  
  @param Menu $menu
  @param Role[] $userRoles
docstring_tokens: authenticate menu entries by checking each one against the user s roles if necessary