protected function _extractFinder($finderData)
    {
        $finderData = (array)$finderData;

        if (is_numeric(key($finderData))) {
            return [current($finderData), []];
        }

        return [key($finderData), current($finderData)];
    }
protected function _extractFinder($finderData)
    {
        $finderData = (array)$finderData;

        if (is_numeric(key($finderData))) {
            return [current($finderData), []];
        }

        return [key($finderData), current($finderData)];
    }
protected function _extractFinder ( $ finderData ) { $ finderData = ( array ) $ finderData ; if ( is_numeric ( key ( $ finderData ) ) ) { return [ current ( $ finderData ) , [ ] ] ; } return [ key ( $ finderData ) , current ( $ finderData ) ] ; }
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
Helper method to infer the requested finder and its options .