WordPress at a glance
function is not described

PHPMailer\PHPMailer

PHPMailer::attachmentExists() public WP 1.0

Check if an attachment (non-inline) is present.

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

No Hooks.

Return

true|false.

Usage

$PHPMailer = new PHPMailer();
$PHPMailer->attachmentExists();

Code of PHPMailer::attachmentExists() WP 5.7.2

<?php
public function attachmentExists()
{
    foreach ($this->attachment as $attachment) {
        if ('attachment' === $attachment[6]) {
            return true;
        }
    }

    return false;
}