src/Mutator/ShuffleMutator.php
private function shuffleAssoc(array $values)
    {
        $keys = array_keys($values);
        shuffle($keys);

        $output = [];
        foreach ($keys as $key) {
            $output[$key] = $values[$key];
        }

        return $output;
    }
private function shuffleAssoc(array $values)
    {
        $keys = array_keys($values);
        shuffle($keys);

        $output = [];
        foreach ($keys as $key) {
            $output[$key] = $values[$key];
        }

        return $output;
    }
private function shuffleAssoc ( array $ values ) { $ keys = array_keys ( $ values ) ; shuffle ( $ keys ) ; $ output = [ ] ; foreach ( $ keys as $ key ) { $ output [ $ key ] = $ values [ $ key ] ; } return $ output ; }
Shuffle an array while preserving keys.

@param array $values

@return array
Shuffle an array while preserving keys .