@param array $options

@return mixed|null

queuePurge(array(
'queue' => '',
'no_wait' => false,
'ticket' => null)
)
768482
public function queuePurge($options = array())
    {
        $default = array('queue' => '', 'no_wait' => false, 'ticket' => null);
        $options = array_merge($default, $options);
        $options['ticket'] = $this->getTicket($options['ticket']);
        $args = $this->frameBuilder->queuePurge($options);

        $this->sendMethodFrame(array(50, 30), $args);

        if (!$options['no_wait']) {
            return $this->wait(
                array(
                     "50,31" //Channel.queuePurgeOk
                )
            );
        }
        return null;
    }
593786
public function queueDelete($options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($options['queue'])
            ->writeBit($options['if_unused'])
            ->writeBit($options['if_empty'])
            ->writeBit($options['no_wait']);
        return $args;
    }
1237100
public function queue_delete($queue = '', $if_unused = false, $if_empty = false, $nowait = false, $ticket = null)
    {
        $ticket = $this->getTicket($ticket);

        list($class_id, $method_id, $args) = $this->protocolWriter->queueDelete(
            $ticket,
            $queue,
            $if_unused,
            $if_empty,
            $nowait
        );

        $this->send_method_frame(array($class_id, $method_id), $args);

        if ($nowait) {
            return null;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('queue.delete_ok')
        ), false, $this->channel_rpc_timeout);
    }
220756
private function getOptionsUsage(array $options) {
        $usage = '';

        foreach ($options as $option) {
            $name = $option->getName();
            $alias = $option->getAlias();
            $names = [];
            $info = '';

            if ($name) {
                $names[] = $name;
            }

            if ($alias) {
                $names[] = $alias;
            }

            $names = implode('|', $names);

            if ($option->isRequired()) {
                if ($option->isMultiple()) {
                    $info .= "$names...";
                } else {
                    $info .= "$names";
                }
            } else {
                if ($option->isMultiple()) {
                    $info .= "$names... ?";
                } else {
                    $info .= "$names ?";
                }
            }

            if ($option->isIncremental()) {
                $info .= '=1..n';
            } else if ($option->isBoolean()) {
                $info .= '=true/false';
            }

            $usage .= "[<green>$info</green>]";
        }

        return $usage;
    }
440072
public function queueDeclare($options = array())
    {
        $default = array('queue' => '', 'passive' => false, 'durable' => false, 'exclusive' => false,
        'auto_delete' => true, 'no_wait' => false, 'arguments' => array(), 'ticket' => null);
        $options = array_merge($default, $options);
        $options['arguments'] = $this->getArguments($options['arguments']);
        $options['ticket'] = $this->getTicket($options['ticket']);
        $args = $this->frameBuilder->queueDeclare($options);
        $this->sendMethodFrame(array(50, 10), $args);

        if (!$options['no_wait']) {
            return $this->wait(
                array(
                     "50,11" // Channel.queueDeclareOk
                )
            );
        }
        return null;
    }
1057675
public function get(array $options = [])
    {
        $pagination = '';

        if (isset($options['page']) && is_int($options['page'])) {
            $pagination = '?page='.$options['page'];
        }

        if (isset($options['key'])) {
            return $this->client->get('plugin-licenses/'.$options['key'].$pagination);
        }

        return $this->client->get('plugin-licenses'.$pagination);
    }
216476
public function queueBind($queue, $exchange, $options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($queue)
            ->writeShortStr($exchange)
            ->writeShortStr($options['routing_key'])
            ->writeBit($options['no_wait'])
            ->writeTable($options['arguments']);
        return $args;
    }
129399
public function getOptions($options)
    {
        // Add verify to options
        $options = array_merge(['verify' => $this->verify], $options);

        if ($this->async) {
            $options = array_merge(['future' => true], $options);
        }

        // merge and return
        return array_merge_recursive($this->options, $options);
    }
442620
public function getBuffer(array $options = [])
    {
        $docEol  = $this->Document->eol;
        $options = Hash::merge(['safe' => true], $options);

        if (Arr::key('block', $options)) {
            unset($options['block']);
        }

        if (count($this->_buffers)) {
            $scripts = $docEol .
                'jQuery (function($) {'  . $docEol .
                implode($docEol, $this->_buffers) . $docEol .
                '});' . $docEol;

            return $this->Html->scriptBlock($scripts, $options) . $docEol;
        }

        return null;
    }
29384
protected function getResourcePayload(array $options = []) : ?array
    {
        $local  = $this->parseLocalResources($this->resources->get('compiled'));
        $remote = $this->resources->get('styles.remote');

        $sheets = $this->mergeResourceArrays($local, $remote);

        if ($sheets === null) {
            return null;
        }

        ksort($sheets);

        return $sheets;
    }
987252
public function getObject(array $options = array())
    {
        $content = $this->getContent();

        if (is_null($content)) {
            return (object)$content;
        }

        return json_decode($this->content, false);
    }
1348264
public function consume(array $options = array())
    {
        $this->logger->debug(sprintf(
            'Start consuming queue %s.',
            $this->messageProvider->getQueueName()
        ));

        $this->optionsResolver->setDefaults(array(
            'poll_interval' => 50000,
            'queue' => $this->messageProvider->getQueueName(),
        ));

        if ($this->processor instanceof ConfigurableInterface) {
            $this->processor->setDefaultOptions($this->optionsResolver);
        }

        $options = $this->optionsResolver->resolve($options);

        if ($this->processor instanceof InitializableInterface) {
            $this->processor->initialize($options);
        }

        while (true) {
            while (null !== $message = $this->messageProvider->get()) {
                if (false === $this->processor->process($message, $options)) {
                    break 2;
                }
            }

            if ($this->processor instanceof SleepyInterface) {
                if (false === $this->processor->sleep($options)) {
                    break;
                }
            }

            usleep($options['poll_interval']);
        }

        if ($this->processor instanceof TerminableInterface) {
            $this->processor->terminate($options);
        }
    }
24888
public function flush(array $options = [])
    {
        $endpoint = new Flush();
        $endpoint->setParams($options);

        return $this->requestEndpoint($endpoint);
    }
1071386
protected function convertSocketTimeout(array $options)
    {
        if (version_compare(phpversion('mongo'), '1.5.0', '<')) {
            return $options;
        }

        if (isset($options['timeout']) && ! isset($options['socketTimeoutMS'])) {
            $options['socketTimeoutMS'] = $options['timeout'];
            unset($options['timeout']);
        }

        return $options;
    }
301549
private function resolveOptions(array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configure($resolver);

        return $resolver->resolve($options);
    }
36224
public static function parse($options)
    {
        if ($options instanceof self) {
            return $options;
        }

        if (is_null($options)) {
            return new RequestOptions(null, [], null);
        }

        if (is_string($options)) {
            return new RequestOptions($options, [], null);
        }

        if (is_array($options)) {
            $headers = [];
            $key = null;
            $base = null;
            if (array_key_exists('api_key', $options)) {
                $key = $options['api_key'];
            }
            if (array_key_exists('idempotency_key', $options)) {
                $headers['Idempotency-Key'] = $options['idempotency_key'];
            }
            if (array_key_exists('stripe_account', $options)) {
                $headers['Stripe-Account'] = $options['stripe_account'];
            }
            if (array_key_exists('stripe_version', $options)) {
                $headers['Stripe-Version'] = $options['stripe_version'];
            }
            if (array_key_exists('api_base', $options)) {
                $base = $options['api_base'];
            }
            return new RequestOptions($key, $headers, $base);
        }

        $message = 'The second argument to Stripe API method calls is an '
           . 'optional per-request apiKey, which must be a string, or '
           . 'per-request options, which must be an array. (HINT: you can set '
           . 'a global apiKey by "Stripe::setApiKey(<apiKey>)")';
        throw new Error\Api($message);
    }
1030554
public function cleanOptions($options = [])
    {
        // If item is null or empty we will remove them.
        return collect($options)->reject(function ($item) {
            return empty($item) || is_null($item);
        })->all();
    }