<commit_before><?php

namespace Application\Controller;

use Application\Service\RepositoryRetriever;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class ContributorsController extends AbstractActionController
{
    const LIST_LIMIT = 36;

    /**
     * @var RepositoryRetriever
     */
    private $repositoryRetriever;

    /**
     * @var array
     */
    private $repositoryData;

    /**
     * @param RepositoryRetriever $repositoryRetriever
     * @param array $repositoryData
     */
    public function __construct(RepositoryRetriever $repositoryRetriever, array $repositoryData)
    {
        $this->repositoryRetriever = $repositoryRetriever;
        $this->repositoryData = $repositoryData;
    }

    public function indexAction()
    {
        $contributors = $this->repositoryRetriever->getContributors(
            $this->repositoryData['owner'],
            $this->repositoryData['name'],
            self::LIST_LIMIT
        );

        $metadata = $this->repositoryRetriever->getUserRepositoryMetadata(
            $this->repositoryData['owner'],
            $this->repositoryData['name']
        );

        return new ViewModel([
            'contributors' => $contributors,
            'metadata' => $metadata,
        ]);
    }
}
<commit_msg>Enhancement: Shuffle list of contributors<commit_after><?php

namespace Application\Controller;

use Application\Service\RepositoryRetriever;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class ContributorsController extends AbstractActionController
{
    const LIST_LIMIT = 36;

    /**
     * @var RepositoryRetriever
     */
    private $repositoryRetriever;

    /**
     * @var array
     */
    private $repositoryData;

    /**
     * @param RepositoryRetriever $repositoryRetriever
     * @param array $repositoryData
     */
    public function __construct(RepositoryRetriever $repositoryRetriever, array $repositoryData)
    {
        $this->repositoryRetriever = $repositoryRetriever;
        $this->repositoryData = $repositoryData;
    }

    public function indexAction()
    {
        $contributors = $this->repositoryRetriever->getContributors(
            $this->repositoryData['owner'],
            $this->repositoryData['name'],
            self::LIST_LIMIT
        );

        shuffle($contributors);

        $metadata = $this->repositoryRetriever->getUserRepositoryMetadata(
            $this->repositoryData['owner'],
            $this->repositoryData['name']
        );

        return new ViewModel([
            'contributors' => $contributors,
            'metadata' => $metadata,
        ]);
    }
}

{'fraction_non_alphanumeric': 0.1098612673415823, 'fraction_numerical': 0.0014998125234345708, 'mean_word_length': 2.7314685314685314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '2563067', 'n_tokens_mistral': 724, 'n_tokens_neox': 700, 'n_words': 123}