protected static function formatContainer($container)
    {
        if (!is_array($container)) {
            $container = [$container];
        }

        $instance = array_shift($container);

        if (!$method = array_shift($container)) {
            if ($instance instanceof \ArrayAccess) {
                $method = 'offsetGet';
            } else {
                $method = 'get';
            }
        }

        return [$instance, $method];
    }