public function getDistributions($token, $event, array $dates)
    {
        $distributions = [];

        foreach ($dates as $date) {
            $key = $this->generateEntryKey(
                $token,
                $event,
                $date
            );

            $partials = $this->doRedisQuery(function () use ($key) {
                $this
                    ->redis
                    ->hgetall($key . '_distr');
            }, []);

            foreach ($partials as $key => $value) {
                $distributions[$key] = isset($partialTotals[$key])
                    ? $distributions[$key] + $value
                    : $value;
            }
        }

        arsort($distributions);

        return $distributions;
    }
public function getDistributions($token, $event, array $dates)
    {
        $distributions = [];

        foreach ($dates as $date) {
            $key = $this->generateEntryKey(
                $token,
                $event,
                $date
            );

            $partials = $this->doRedisQuery(function () use ($key) {
                $this
                    ->redis
                    ->hgetall($key . '_distr');
            }, []);

            foreach ($partials as $key => $value) {
                $distributions[$key] = isset($partialTotals[$key])
                    ? $distributions[$key] + $value
                    : $value;
            }
        }

        arsort($distributions);

        return $distributions;
    }
public function getDistributions ( $ token , $ event , array $ dates ) { $ distributions = [ ] ; foreach ( $ dates as $ date ) { $ key = $ this -> generateEntryKey ( $ token , $ event , $ date ) ; $ partials = $ this -> doRedisQuery ( function ( ) use ( $ key ) { $ this -> redis -> hgetall ( $ key . '_distr' ) ; } , [ ] ) ; foreach ( $ partials as $ key => $ value ) { $ distributions [ $ key ] = isset ( $ partialTotals [ $ key ] ) ? $ distributions [ $ key ] + $ value : $ value ; } } arsort ( $ distributions ) ; return $ distributions ; }
Get distributions given an event and a set of dates.

[
"value3": 24,
"value7": 13,
"value8": 9,
]

@param string $token Event
@param string $event Token
@param array  $dates Dates

@return array Distribution with totals
Get distributions given an event and a set of dates .