original_string: protected function _extractFinder($finderData)
      {
          $finderData = (array)$finderData;
  
          if (is_numeric(key($finderData))) {
              return [current($finderData), []];
          }
  
          return [key($finderData), current($finderData)];
      }
code: protected function _extractFinder($finderData)
      {
          $finderData = (array)$finderData;
  
          if (is_numeric(key($finderData))) {
              return [current($finderData), []];
          }
  
          return [key($finderData), current($finderData)];
      }
code_tokens: protected function _extractFinder ( $ finderData ) { $ finderData = ( array ) $ finderData ; if ( is_numeric ( key ( $ finderData ) ) ) { return [ current ( $ finderData ) , [ ] ] ; } return [ key ( $ finderData ) , current ( $ finderData ) ] ; }
docstring: Helper method to infer the requested finder and its options.
  
  Returns the inferred options from the finder $type.
  
  ### Examples:
  
  The following will call the finder 'translations' with the value of the finder as its options:
  $query->contain(['Comments' => ['finder' => ['translations']]]);
  $query->contain(['Comments' => ['finder' => ['translations' => []]]]);
  $query->contain(['Comments' => ['finder' => ['translations' => ['locales' => ['en_US']]]]]);
  
  @param string|array $finderData The finder name or an array having the name as key
  and options as value.
  @return array
docstring_tokens: Helper method to infer the requested finder and its options .