original_string: protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
      {
          $active = [];
          foreach ($availableOptions as $id => $option) {
              if (!in_array($id, $activeKeys)) {
                  continue;
              }
  
              $active[$id] = $option;
              unset($availableOptions[$id]);
          }
  
          return $active;
      }
code: protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
      {
          $active = [];
          foreach ($availableOptions as $id => $option) {
              if (!in_array($id, $activeKeys)) {
                  continue;
              }
  
              $active[$id] = $option;
              unset($availableOptions[$id]);
          }
  
          return $active;
      }
code_tokens: protected function filterActiveOptions ( array $ activeKeys , array & $ availableOptions ) { $ active = [ ] ; foreach ( $ availableOptions as $ id => $ option ) { if ( ! in_array ( $ id , $ activeKeys ) ) { continue ; } $ active [ $ id ] = $ option ; unset ( $ availableOptions [ $ id ] ) ; } return $ active ; }
docstring: Removes any already selected options from the available options, returns
  a newly built array.
  @param  array  $activeKeys
  @param  array  $availableOptions
  @return array
docstring_tokens: Removes any already selected options from the available options returns a newly built array .