Completed
Push — 5.x ( 158fb7...5eecd4 )
by Lars
06:12
created
lib/classes/Swift/Signers/DKIMSigner.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
             return array('DKIM-Signature', 'X-DebugHash');
511 511
         }
512 512
 
513
-      return array('DKIM-Signature');
513
+        return array('DKIM-Signature');
514 514
     }
515 515
 
516 516
     /**
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 
592 592
         if ($this->_signatureTimestamp === true) {
593 593
 
594
-          $params['t'] = time();
594
+            $params['t'] = time();
595 595
             if ($this->_signatureExpiration !== false) {
596 596
                 $params['x'] = $params['t'] + $this->_signatureExpiration;
597 597
             }
@@ -739,8 +739,8 @@  discard block
 block discarded – undo
739 739
     {
740 740
         $len = strlen($string);
741 741
         if ($len > ($new_len = ($this->_maxLen - $this->_bodyLen))) {
742
-          /** @noinspection CallableParameterUseCaseInTypeContextInspection */
743
-          $string = substr($string, 0, $new_len);
742
+            /** @noinspection CallableParameterUseCaseInTypeContextInspection */
743
+            $string = substr($string, 0, $new_len);
744 744
             $len = $new_len;
745 745
         }
746 746
         hash_update($this->_bodyHashHandler, $string);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     {
210 210
         $this->_privateKey = $privateKey;
211 211
         $this->_domainName = $domainName;
212
-        $this->_signerIdentity = '@' . $domainName;
212
+        $this->_signerIdentity = '@'.$domainName;
213 213
         $this->_selector = $selector;
214 214
         $this->_passphrase = $passphrase;
215 215
 
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
         );
581 581
 
582 582
         if ($this->_bodyCanon != 'simple') {
583
-            $params['c'] = $this->_headerCanon . '/' . $this->_bodyCanon;
583
+            $params['c'] = $this->_headerCanon.'/'.$this->_bodyCanon;
584 584
         } elseif ($this->_headerCanon != 'simple') {
585 585
             $params['c'] = $this->_headerCanon;
586 586
         }
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 
615 615
         $string = '';
616 616
         foreach ($params as $k => $v) {
617
-            $string .= $k . '=' . $v . '; ';
617
+            $string .= $k.'='.$v.'; ';
618 618
         }
619 619
 
620 620
         $string = trim($string);
@@ -623,14 +623,14 @@  discard block
 block discarded – undo
623 623
         // Add the last DKIM-Signature
624 624
         $tmp = $headers->getAll('DKIM-Signature');
625 625
         $this->_dkimHeader = end($tmp);
626
-        $this->_addHeader(trim($this->_dkimHeader->toString()) . "\r\n b=", true);
626
+        $this->_addHeader(trim($this->_dkimHeader->toString())."\r\n b=", true);
627 627
         $this->_endOfHeaders();
628 628
 
629 629
         if ($this->_debugHeaders) {
630 630
             $headers->addTextHeader('X-DebugHash', base64_encode($this->_headerHash));
631 631
         }
632 632
 
633
-        $this->_dkimHeader->setValue($string . ' b=' . trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' ')));
633
+        $this->_dkimHeader->setValue($string.' b='.trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, ' ')));
634 634
 
635 635
         return $this;
636 636
     }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                 $name = Swift::strtolowerWithStaticCache(trim($exploded[0]));
649 649
                 $value = str_replace("\r\n", '', $exploded[1]);
650 650
                 $value = preg_replace("/[ \t][ \t]+/", ' ', $value);
651
-                $header = $name . ':' . trim($value) . ($is_sig ? '' : "\r\n");
651
+                $header = $name.':'.trim($value).($is_sig ? '' : "\r\n");
652 652
             case 'simple':
653 653
                 // Nothing to do
654 654
         }
@@ -780,13 +780,13 @@  discard block
 block discarded – undo
780 780
 
781 781
         $pkeyId = openssl_get_privatekey($this->_privateKey, $this->_passphrase);
782 782
         if (!$pkeyId) {
783
-            throw new Swift_SwiftException('Unable to load DKIM Private Key [' . openssl_error_string() . ']');
783
+            throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']');
784 784
         }
785 785
 
786 786
         if (openssl_sign($this->_headerCanonData, $signature, $pkeyId, $algorithm)) {
787 787
             return $signature;
788 788
         }
789 789
 
790
-        throw new Swift_SwiftException('Unable to sign DKIM Hash [' . openssl_error_string() . ']');
790
+        throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']');
791 791
     }
792 792
 }
Please login to merge, or discard this patch.