Code Duplication    Length = 3-3 lines in 2 locations

catalog/includes/OSC/OM/Mail.php 2 locations

@@ 298-300 (lines=3) @@
295
        $to_email_addresses = [];
296
297
        foreach ($this->to as $to) {
298
            if ((strpos($to['email_address'], "\n") !== false) || (strpos($to['email_address'], "\r") !== false)) {
299
                return false;
300
            }
301
302
            if ((strpos($to['name'], "\n") !== false) || (strpos($to['name'], "\r") !== false)) {
303
                return false;
@@ 302-304 (lines=3) @@
299
                return false;
300
            }
301
302
            if ((strpos($to['name'], "\n") !== false) || (strpos($to['name'], "\r") !== false)) {
303
                return false;
304
            }
305
306
            if (empty($to['name'])) {
307
                $to_email_addresses[] = $to['email_address'];