Piwik\Plugins\CoreVisualizations\Visualizations\Cloud::shuffleCloud PHP Method

shuffleCloud() protected method

Shuffle associated names in array
protected shuffleCloud ( )
    protected function shuffleCloud()
    {
        if (self::$debugDisableShuffle) {
            return;
        }
        $keys = array_keys($this->wordsArray);
        shuffle($keys);
        if (count($keys) && is_array($keys)) {
            $tmpArray = $this->wordsArray;
            $this->wordsArray = array();
            foreach ($keys as $value) {
                $this->wordsArray[$value] = $tmpArray[$value];
            }
        }
    }