private function setExpirationDate(array $parsedValues)
    {
        $expirationDate = null;
        if (isset($parsedValues[self::EXPIRATION_INDEX])) {
            $dateStr = $parsedValues[self::EXPIRATION_INDEX];

            if ($dateStr !== '-') {
                $expirationDate = \DateTime::createFromFormat('Y-m-d', $dateStr);

                if (!$expirationDate) {
                    throw new AttributeException('Invalid Date provided');
                }
            }
        }

        $this->expirationDate = $expirationDate;
    }
private function setExpirationDate(array $parsedValues)
    {
        $expirationDate = null;
        if (isset($parsedValues[self::EXPIRATION_INDEX])) {
            $dateStr = $parsedValues[self::EXPIRATION_INDEX];

            if ($dateStr !== '-') {
                $expirationDate = \DateTime::createFromFormat('Y-m-d', $dateStr);

                if (!$expirationDate) {
                    throw new AttributeException('Invalid Date provided');
                }
            }
        }

        $this->expirationDate = $expirationDate;
    }
private function setExpirationDate ( array $ parsedValues ) { $ expirationDate = null ; if ( isset ( $ parsedValues [ self :: EXPIRATION_INDEX ] ) ) { $ dateStr = $ parsedValues [ self :: EXPIRATION_INDEX ] ; if ( $ dateStr !== '-' ) { $ expirationDate = \ DateTime :: createFromFormat ( 'Y-m-d' , $ dateStr ) ; if ( ! $ expirationDate ) { throw new AttributeException ( 'Invalid Date provided' ) ; } } } $ this -> expirationDate = $ expirationDate ; }
Set expirationDate to DateTime object or NULL if the value is '-'

@param array $parsedValues

@throws AttributeException
Set expirationDate to DateTime object or NULL if the value is -