<commit_before><?php

namespace AppBundle\Service;

use Hashids\Hashids;

class CodeGeneratorService
{
    private $salt;

    /**
     * CodeGeneratorService constructor.
     * @param $salt
     */
    public function __construct($salt)
    {
        $this->salt = $salt;
    }

    public function generateCode()
    {
        $hashIds = new Hashids($this->salt);
        return $hashIds->encode(time());
    }
}<commit_msg>Fixed issue with code generator returning empty codes<commit_after><?php

namespace AppBundle\Service;

use Hashids\Hashids;

class CodeGeneratorService
{
    private $salt;

    /**
     * CodeGeneratorService constructor.
     * @param $salt
     */
    public function __construct($salt)
    {
        $this->salt = $salt;
    }

    public function generateCode()
    {
        $hashIds = new Hashids($this->salt);
        return $hashIds->encode(time() - 1000000000);
    }
}

{'fraction_non_alphanumeric': 0.12004405286343613, 'fraction_numerical': 0.011013215859030838, 'mean_word_length': 2.578740157480315, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '6193878', 'n_tokens_mistral': 290, 'n_tokens_neox': 265, 'n_words': 60}