MGDigital\BusQue\QueueResolver\QueueVoterResolver::getVotes PHP Метод

getVotes() публичный Метод

public getVotes ( mixed $command ) : array
$command mixed
Результат array
    public function getVotes($command) : array
    {
        $votes = [];
        foreach ($this->voters as $voter) {
            $vote = $voter->getVote($command);
            if ($vote instanceof QueueVote) {
                $votes[] = $vote;
            }
        }
        usort($votes, function (QueueVote $voteA, QueueVote $voteB) {
            return $voteB->getConfidence() <=> $voteA->getConfidence();
        });
        return $votes;
    }