original_string: protected function _extractFinder($options)
      {
          $type = !empty($options['finder']) ? $options['finder'] : 'all';
          unset($options['finder'], $options['maxLimit']);
  
          if (is_array($type)) {
              $options = (array)current($type) + $options;
              $type = key($type);
          }
  
          return [$type, $options];
      }
code: protected function _extractFinder($options)
      {
          $type = !empty($options['finder']) ? $options['finder'] : 'all';
          unset($options['finder'], $options['maxLimit']);
  
          if (is_array($type)) {
              $options = (array)current($type) + $options;
              $type = key($type);
          }
  
          return [$type, $options];
      }
code_tokens: protected function _extractFinder ( $ options ) { $ type = ! empty ( $ options [ 'finder' ] ) ? $ options [ 'finder' ] : 'all' ; unset ( $ options [ 'finder' ] , $ options [ 'maxLimit' ] ) ; if ( is_array ( $ type ) ) { $ options = ( array ) current ( $ type ) + $ options ; $ type = key ( $ type ) ; } return [ $ type , $ options ] ; }
docstring: Extracts the finder name and options out of the provided pagination options.
  
  @param array $options the pagination options.
  @return array An array containing in the first position the finder name
  and in the second the options to be passed to it.
docstring_tokens: Extracts the finder name and options out of the provided pagination options .