Form/Type/AbstractType.php
public function getCustomerToMailAddress($formData = [])
    {
        $email = $this->getAttribute('mail_customer_to_address');

        if (is_object($formData)) {
            if (method_exists($formData, 'getEmail')) {
                $email = $formData->getEmail();
            } elseif (isset($formData->email)) {
                $email = $formData->email;
            }
        } elseif (is_array($formData) && isset($formData['email'])) {
            $email = $formData['email'];
        }

        return $email;
    }
public function getCustomerToMailAddress($formData = [])
    {
        $email = $this->getAttribute('mail_customer_to_address');

        if (is_object($formData)) {
            if (method_exists($formData, 'getEmail')) {
                $email = $formData->getEmail();
            } elseif (isset($formData->email)) {
                $email = $formData->email;
            }
        } elseif (is_array($formData) && isset($formData['email'])) {
            $email = $formData['email'];
        }

        return $email;
    }
{@inheritdoc}