Code Duplication    Length = 15-15 lines in 2 locations

lib/classes/Swift/Signers/DKIMSigner.php 1 location

@@ 613-627 (lines=15) @@
610
     * @param string $header
611
     * @param bool   $is_sig
612
     */
613
    protected function _addHeader($header, $is_sig = false)
614
    {
615
        switch ($this->_headerCanon) {
616
            case 'relaxed':
617
                // Prepare Header and cascade
618
                $exploded = explode(':', $header, 2);
619
                $name = Swift::strtolowerWithStaticCache(trim($exploded[0]));
620
                $value = str_replace("\r\n", '', $exploded[1]);
621
                $value = preg_replace("/[ \t][ \t]+/", ' ', $value);
622
                $header = $name . ':' . trim($value) . ($is_sig ? '' : "\r\n");
623
            case 'simple':
624
                // Nothing to do
625
        }
626
        $this->_addToHeaderHash($header);
627
    }
628
629
    /**
630
     * @deprecated This method is currently useless in this class but it must be

lib/classes/Swift/Signers/DomainKeySigner.php 1 location

@@ 440-454 (lines=15) @@
437
    /**
438
     * @param string $header
439
     */
440
    protected function _addHeader($header)
441
    {
442
        switch ($this->_canon) {
443
            case 'nofws':
444
                // Prepare Header and cascade
445
                $exploded = explode(':', $header, 2);
446
                $name = Swift::strtolowerWithStaticCache(trim($exploded[0]));
447
                $value = str_replace("\r\n", '', $exploded[1]);
448
                $value = preg_replace("/[ \t][ \t]+/", ' ', $value);
449
                $header = $name . ':' . trim($value) . "\r\n";
450
            case 'simple':
451
                // Nothing to do
452
        }
453
        $this->_addToHash($header);
454
    }
455
456
    protected function _endOfHeaders()
457
    {