<commit_before><?php

namespace GitList\Controller;

use GitList\Git\Repository;
use Gitter\Model\Commit\Commit;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;

class NetworkController implements ControllerProviderInterface
{
    public function connect(Application $app)
    {
        $route = $app['controllers_factory'];

        $route->get('{repo}/network/{commitishPath}/{page}.json',
            function ($repo, $commitishPath, $page) use ($app) {
                /** @var $repository Repository */
                $repository = $app['git']->getRepositoryFromName($app['git.repos'], $repo);

                if ($commitishPath === null) {
                    $commitishPath = $repository->getHead();
                }

                $pager = $app['util.view']->getPager($page, $repository->getTotalCommits($commitishPath));
                $commits = $repository->getPaginatedCommits($commitishPath, $pager['current']);

                $jsonFormattedCommits = array();

                foreach ($commits as $commit) {
                    $detailsUrl = $app['url_generator']->generate(
                        'commit',
                        array(
                            'repo' => $repo,
                            'commit' => $commit->getHash()
                        )
                    );

                    $jsonFormattedCommits[$commit->getHash()] = array(
                        'hash' => $commit->getHash(),
                        'parentsHash' => $commit->getParentsHash(),
                        'date' => $commit->getDate()->format('U'),
                        'message' => htmlentities($commit->getMessage()),
                        'details' => $detailsUrl,
                        'author' => array(
                            'name' => $commit->getAuthor()->getName(),
                            'email' => $commit->getAuthor()->getEmail(),
                            // due to the lack of a inbuilt javascript md5 mechanism, build the full avatar url on the php side
                            'image' => 'http://gravatar.com/avatar/' . md5(
                                strtolower($commit->getAuthor()->getEmail())
                            ) . '?s=40'
                        )
                    );
                }<commit_msg>Missing https on gravatar in NetworkController<commit_after><?php

namespace GitList\Controller;

use GitList\Git\Repository;
use Gitter\Model\Commit\Commit;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;

class NetworkController implements ControllerProviderInterface
{
    public function connect(Application $app)
    {
        $route = $app['controllers_factory'];

        $route->get('{repo}/network/{commitishPath}/{page}.json',
            function ($repo, $commitishPath, $page) use ($app) {
                /** @var $repository Repository */
                $repository = $app['git']->getRepositoryFromName($app['git.repos'], $repo);

                if ($commitishPath === null) {
                    $commitishPath = $repository->getHead();
                }

                $pager = $app['util.view']->getPager($page, $repository->getTotalCommits($commitishPath));
                $commits = $repository->getPaginatedCommits($commitishPath, $pager['current']);

                $jsonFormattedCommits = array();

                foreach ($commits as $commit) {
                    $detailsUrl = $app['url_generator']->generate(
                        'commit',
                        array(
                            'repo' => $repo,
                            'commit' => $commit->getHash()
                        )
                    );

                    $jsonFormattedCommits[$commit->getHash()] = array(
                        'hash' => $commit->getHash(),
                        'parentsHash' => $commit->getParentsHash(),
                        'date' => $commit->getDate()->format('U'),
                        'message' => htmlentities($commit->getMessage()),
                        'details' => $detailsUrl,
                        'author' => array(
                            'name' => $commit->getAuthor()->getName(),
                            'email' => $commit->getAuthor()->getEmail(),
                            // due to the lack of a inbuilt javascript md5 mechanism, build the full avatar url on the php side
                            'image' => '//gravatar.com/avatar/' . md5(
                                strtolower($commit->getAuthor()->getEmail())
                            ) . '?s=40'
                        )
                    );
                }
{'fraction_non_alphanumeric': 0.13495762711864406, 'fraction_numerical': 0.001694915254237288, 'mean_word_length': 1.4926082365364308, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5508942', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1111, 'n_words': 211}