<commit_before><?php
/**
 * This file is part of the Juvem package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */


namespace AppBundle\Entity\AcquisitionAttribute;


class DateFilloutValue extends FilloutValue
{
    /**
     * FilloutValue constructor.
     *
     * @param Attribute $attribute Related attribute
     * @param null|\DateTime|string $rawValue Raw value of fillout
     */
    public function __construct(Attribute $attribute, $rawValue = null)
    {
        if ($rawValue === '-' || $rawValue === '') {
            $rawValue = null;
        }
        if ($rawValue !== null & !$rawValue instanceof \DateTimeInterface) {
            try {
                $rawValue = new \DateTime($rawValue);
                $rawValue->setTime(10, 0, 0);
            } catch (\Exception $e) {
                throw new \InvalidArgumentException('Failed to convert "'.$rawValue.'" to datetime', 0, $e);
            }
        }
        
        //intentionally not calling parent<commit_msg>Revert "Preventing error if date value contains minus sign"<commit_after><?php
/**
 * This file is part of the Juvem package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */


namespace AppBundle\Entity\AcquisitionAttribute;


class DateFilloutValue extends FilloutValue
{
    /**
     * FilloutValue constructor.
     *
     * @param Attribute $attribute Related attribute
     * @param null|\DateTime|string $rawValue Raw value of fillout
     */
    public function __construct(Attribute $attribute, $rawValue = null)
    {
        if ($rawValue !== null & !$rawValue instanceof \DateTimeInterface) {
            try {
                $rawValue = new \DateTime($rawValue);
                $rawValue->setTime(10, 0, 0);
            } catch (\Exception $e) {
                throw new \InvalidArgumentException('Failed to convert "'.$rawValue.'" to datetime', 0, $e);
            }
        }
        
        //intentionally not calling parent
{'fraction_non_alphanumeric': 0.11105969458583989, 'fraction_numerical': 0.004627487274409995, 'mean_word_length': 2.3623639191290824, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5527438', 'n_tokens_mistral': 583, 'n_tokens_neox': 563, 'n_words': 186}