<commit_before><?php
/**
 * Created by PhpStorm.
 * User: nagyatka
 * Date: 2016. 07. 21.
 * Time: 16:58
 */

namespace KodiApp\Response;


use KodiApp\Application;

class JsonResponse extends Response
{

    /**
     * JsonResponse constructor.
     * @param array $values
     * @param int $status
     */
    public function __construct(array $values, $status = 200)
    {
        parent::__construct(
            json_encode($values, JSON_NUMERIC_CHECK),
            $status,
            ['Content-type: application/json']
        );
    }

}<commit_msg>JsonResponse imporvement (new param for json_encode)<commit_after><?php
/**
 * Created by PhpStorm.
 * User: nagyatka
 * Date: 2016. 07. 21.
 * Time: 16:58
 */

namespace KodiApp\Response;


use KodiApp\Application;

class JsonResponse extends Response
{

    /**
     * JsonResponse constructor.
     * @param array $values
     * @param int $options [optional]
     * @param int $status
     */
    public function __construct(array $values,$options = JSON_NUMERIC_CHECK, $status = 200)
    {
        parent::__construct(
            json_encode($values, $options),
            $status,
            [
                'Content-type: application/json',
            ]
        );
    }

}
{'fraction_non_alphanumeric': 0.1189710610932476, 'fraction_numerical': 0.024115755627009645, 'mean_word_length': 2.2421875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5092368', 'n_tokens_mistral': 408, 'n_tokens_neox': 376, 'n_words': 90}