<commit_before><?php
/* 
 * Copyright 2014 <NAME> <http://jacksleight.com/>
 * This source file is subject to the MIT license that is bundled with this package in the file LICENCE. 
 */

namespace Coast\Doctrine\DBAL\Types;

class ArrayType extends \Doctrine\DBAL\Types\ArrayType
{
    const TARRAY = 'coast_array';

    public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
    {
        return isset($value)
        	? json_decode($value, true)
        	: null;
    }

    public function convertToDatabaseValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
    {
        return isset($value)
        	? json_encode($value)
        	: null;
    }

    public function getName()
    {
        return self::TARRAY;
    }
}<commit_msg>Modify json behaviour.<commit_after><?php
/* 
 * Copyright 2014 <NAME> <http://jacksleight.com/>
 * This source file is subject to the MIT license that is bundled with this package in the file LICENCE. 
 */

namespace Coast\Doctrine\DBAL\Types;

class ArrayType extends \Doctrine\DBAL\Types\ArrayType
{
    const TARRAY = 'coast_array';

    public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
    {
        return isset($value)
        	? json_decode($value)
        	: null;
    }

    public function convertToDatabaseValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
    {
        return isset($value)
        	? json_encode($value)
        	: null;
    }

    public function getName()
    {
        return self::TARRAY;
    }
}
{'fraction_non_alphanumeric': 0.10486418193303854, 'fraction_numerical': 0.00505369551484523, 'mean_word_length': 2.835351089588378, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '638042', 'n_tokens_mistral': 488, 'n_tokens_neox': 472, 'n_words': 115}