<?php

namespace Dipper\Sms\Strategies;

use Dipper\Sms\Contracts\StrategyInterface;

class RandomStrategy implements StrategyInterface
{
    /**
     * @param array $gateways
     *
     * @return array
     */
    public function apply(array $gateways)
    {
        uasort($gateways, function () {
            return mt_rand() - mt_rand();
        });

        return array_keys($gateways);
    }
}
