src/Entity/Mail.php
protected function addAddress($address, $label, $field)
    {
        $label = is_string($label) ? trim($label) : $label;
        $address = is_string($address) ? trim($address) : $label;

        $label = $label ?: $address;

        if (!empty($address)) {
            $this->{$field}[$address] = $label;
        }
    }
protected function addAddress($address, $label, $field)
    {
        $label = is_string($label) ? trim($label) : $label;
        $address = is_string($address) ? trim($address) : $label;

        $label = $label ?: $address;

        if (!empty($address)) {
            $this->{$field}[$address] = $label;
        }
    }
protected function addAddress ( $ address , $ label , $ field ) { $ label = is_string ( $ label ) ? trim ( $ label ) : $ label ; $ address = is_string ( $ address ) ? trim ( $ address ) : $ label ; $ label = $ label ? : $ address ; if ( ! empty ( $ address ) ) { $ this -> { $ field } [ $ address ] = $ label ; } }
Add a address in a array property

@param string $address
@param string $label
@param string $field
Add a address in a array property