public function validContacts(array $contacts, bool $use_keys = false): bool
    {
        if ($use_keys) {
            $contacts = array_keys($contacts);
        }

        foreach ($contacts as $contact) {
            if (!$this->validContact($contact)) {
                return false;
            }
        }

        return true;
    }
public function validContacts(array $contacts, bool $use_keys = false): bool
    {
        if ($use_keys) {
            $contacts = array_keys($contacts);
        }

        foreach ($contacts as $contact) {
            if (!$this->validContact($contact)) {
                return false;
            }
        }

        return true;
    }
public function validContacts ( array $ contacts , bool $ use_keys = false ) : bool { if ( $ use_keys ) { $ contacts = array_keys ( $ contacts ) ; } foreach ( $ contacts as $ contact ) { if ( ! $ this -> validContact ( $ contact ) ) { return false ; } } return true ; }
Validates an array of contacts.

@param array $contacts
@param bool  $use_keys

@return bool
Validates an array of contacts .