WordPress at a glance
function is not described

PHPMailer\PHPMailer

PHPMailer::addrFormat() public WP 1.0

Format an address for use in a message header.

{} It's a method of the class: PHPMailer{}

No Hooks.

Return

String.

Usage

$PHPMailer = new PHPMailer();
$PHPMailer->addrFormat( $addr );
$addr(array) (required)
A 2-element indexed array, element 0 containing an address, element 1 containing a name like ['joe@example.com', 'Joe User']

Code of PHPMailer::addrFormat() WP 5.7.2

<?php
public function addrFormat($addr)
{
    if (empty($addr[1])) { //No name provided
        return $this->secureHeader($addr[0]);
    }

    return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') .
        ' <' . $this->secureHeader($addr[0]) . '>';
}