<commit_before><?php

/*
 * This file is part of the Behat.
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Behat\Testwork\Ordering\Orderer;

use Behat\Testwork\Specification\SpecificationArrayIterator;

/**
 * Prioritises Suites and Features into random order
 *
 * @author <NAME> <<EMAIL>>
 */
final class RandomOrderer implements Orderer
{
    /**
     * @param SpecificationIterator[] $scenarioIterators
     * @return SpecificationIterator[]
     */
    public function order(array $scenarioIterators)
    {
        $orderedFeatures = $this->orderFeatures($scenarioIterators);
        shuffle($orderedFeatures);

        return $orderedFeatures;
    }

    /**
     * @param array $scenarioIterators
     * @return array
     */
    private function orderFeatures(array $scenarioIterators)<commit_msg>Add use statement for SpecificationIterator<commit_after><?php

/*
 * This file is part of the Behat.
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Behat\Testwork\Ordering\Orderer;

use Behat\Testwork\Specification\SpecificationArrayIterator;
use Behat\Testwork\Specification\SpecificationIterator;

/**
 * Prioritises Suites and Features into random order
 *
 * @author <NAME> <<EMAIL>>
 */
final class RandomOrderer implements Orderer
{
    /**
     * @param SpecificationIterator[] $scenarioIterators
     * @return SpecificationIterator[]
     */
    public function order(array $scenarioIterators)
    {
        $orderedFeatures = $this->orderFeatures($scenarioIterators);
        shuffle($orderedFeatures);

        return $orderedFeatures;
    }

    /**
     * @param array $scenarioIterators
     * @return array
     */
    private function orderFeatures(array $scenarioIterators)
{'fraction_non_alphanumeric': 0.10103092783505155, 'fraction_numerical': 0.0, 'mean_word_length': 3.5995260663507107, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2491127', 'n_tokens_mistral': 534, 'n_tokens_neox': 530, 'n_words': 149}