| @@ -226,8 +226,8 @@ discard block | ||
| 226 | 226 | protected function createMessage1() | 
| 227 | 227 |      { | 
| 228 | 228 | return self::NTLMSIG | 
| 229 | -               . $this->createByte('01') // Message 1 | |
| 230 | -               . $this->createByte('0702'); // Flags | |
| 229 | +                . $this->createByte('01') // Message 1 | |
| 230 | +                . $this->createByte('0702'); // Flags | |
| 231 | 231 | } | 
| 232 | 232 | |
| 233 | 233 | /** | 
| @@ -255,19 +255,19 @@ discard block | ||
| 255 | 255 | $ntlmSec = $this->createSecurityBuffer($ntlmResponse, ($lmInfo[0] + $lmInfo[1]) / 2, true); | 
| 256 | 256 | |
| 257 | 257 | return self::NTLMSIG | 
| 258 | -               . $this->createByte('03') // TYPE 3 message | |
| 259 | - . $lmSec // LM response header | |
| 260 | - . $ntlmSec // NTLM response header | |
| 261 | - . $domainSec // Domain header | |
| 262 | - . $userSec // User header | |
| 263 | - . $workSec // Workstation header | |
| 264 | -               . $this->createByte('000000009a', 8) // session key header (empty) | |
| 265 | -               . $this->createByte('01020000') // FLAGS | |
| 266 | - . $this->convertTo16bit($domain) // domain name | |
| 267 | - . $this->convertTo16bit($username) // username | |
| 268 | - . $this->convertTo16bit($workstation) // workstation | |
| 269 | - . $lmResponse | |
| 270 | - . $ntlmResponse; | |
| 258 | +                . $this->createByte('03') // TYPE 3 message | |
| 259 | + . $lmSec // LM response header | |
| 260 | + . $ntlmSec // NTLM response header | |
| 261 | + . $domainSec // Domain header | |
| 262 | + . $userSec // User header | |
| 263 | + . $workSec // Workstation header | |
| 264 | +                . $this->createByte('000000009a', 8) // session key header (empty) | |
| 265 | +                . $this->createByte('01020000') // FLAGS | |
| 266 | + . $this->convertTo16bit($domain) // domain name | |
| 267 | + . $this->convertTo16bit($username) // username | |
| 268 | + . $this->convertTo16bit($workstation) // workstation | |
| 269 | + . $lmResponse | |
| 270 | + . $ntlmResponse; | |
| 271 | 271 | } | 
| 272 | 272 | |
| 273 | 273 | /** | 
| @@ -280,12 +280,12 @@ discard block | ||
| 280 | 280 | protected function createBlob($timestamp, $client, $targetInfo) | 
| 281 | 281 |      { | 
| 282 | 282 |          return $this->createByte('0101') | 
| 283 | -               . $this->createByte('00') | |
| 284 | - . $timestamp | |
| 285 | - . $client | |
| 286 | -               . $this->createByte('00') | |
| 287 | - . $targetInfo | |
| 288 | -               . $this->createByte('00'); | |
| 283 | +                . $this->createByte('00') | |
| 284 | + . $timestamp | |
| 285 | + . $client | |
| 286 | +                . $this->createByte('00') | |
| 287 | + . $targetInfo | |
| 288 | +                . $this->createByte('00'); | |
| 289 | 289 | } | 
| 290 | 290 | |
| 291 | 291 | /** | 
| @@ -451,16 +451,16 @@ discard block | ||
| 451 | 451 |          foreach ($material as $k => $v) { | 
| 452 | 452 | $b = $this->castToByte(hexdec($v)); | 
| 453 | 453 | $needsParity = ( | 
| 454 | - ( | |
| 455 | - $this->uRShift($b, 7) | |
| 456 | - ^ $this->uRShift($b, 6) | |
| 457 | - ^ $this->uRShift($b, 5) | |
| 458 | - ^ $this->uRShift($b, 4) | |
| 459 | - ^ $this->uRShift($b, 3) | |
| 460 | - ^ $this->uRShift($b, 2) | |
| 461 | - ^ $this->uRShift($b, 1) | |
| 462 | - ) & 0x01 | |
| 463 | - ) == 0; | |
| 454 | + ( | |
| 455 | + $this->uRShift($b, 7) | |
| 456 | + ^ $this->uRShift($b, 6) | |
| 457 | + ^ $this->uRShift($b, 5) | |
| 458 | + ^ $this->uRShift($b, 4) | |
| 459 | + ^ $this->uRShift($b, 3) | |
| 460 | + ^ $this->uRShift($b, 2) | |
| 461 | + ^ $this->uRShift($b, 1) | |
| 462 | + ) & 0x01 | |
| 463 | + ) == 0; | |
| 464 | 464 | |
| 465 | 465 | list($high, $low) = str_split($v); | 
| 466 | 466 | |
| @@ -70,7 +70,7 @@ | ||
| 70 | 70 | * | 
| 71 | 71 | * This method returns a UNIX timestamp. | 
| 72 | 72 | * | 
| 73 | - * @return mixed | |
| 73 | + * @return integer|null | |
| 74 | 74 | */ | 
| 75 | 75 | public function getFieldBodyModel() | 
| 76 | 76 |      { | 
| @@ -202,7 +202,7 @@ | ||
| 202 | 202 | * | 
| 203 | 203 | * @see getNameAddresses() | 
| 204 | 204 | * | 
| 205 | - * @return string[] | |
| 205 | + * @return integer[] | |
| 206 | 206 | */ | 
| 207 | 207 | public function getAddresses() | 
| 208 | 208 |      { | 
| @@ -147,7 +147,7 @@ | ||
| 147 | 147 | $messageStr = $message->toString(); | 
| 148 | 148 | |
| 149 | 149 |          if ($toHeader) { | 
| 150 | - $message->getHeaders()->set($toHeader); | |
| 150 | + $message->getHeaders()->set($toHeader); | |
| 151 | 151 | } | 
| 152 | 152 | $message->getHeaders()->set($subjectHeader); | 
| 153 | 153 | |
| @@ -262,7 +262,7 @@ | ||
| 262 | 262 | * | 
| 263 | 263 | * @param Swift_Mime_Message $message | 
| 264 | 264 | * | 
| 265 | - * @return mixed|null|string | |
| 265 | + * @return string|null | |
| 266 | 266 | */ | 
| 267 | 267 | private function _getReversePath(Swift_Mime_Message $message) | 
| 268 | 268 |      { | 
| @@ -260,7 +260,7 @@ | ||
| 260 | 260 | } | 
| 261 | 261 | |
| 262 | 262 |              if ($tmpRet !== '=00') { | 
| 263 | - $ret .= $tmpRet; | |
| 263 | + $ret .= $tmpRet; | |
| 264 | 264 | } | 
| 265 | 265 | } | 
| 266 | 266 | |
| @@ -641,7 +641,7 @@ | ||
| 641 | 641 | * | 
| 642 | 642 | * @param string $field | 
| 643 | 643 | * | 
| 644 | - * @return null|string[]|string | |
| 644 | + * @return string | |
| 645 | 645 | */ | 
| 646 | 646 | protected function _getHeaderFieldModel($field) | 
| 647 | 647 |      { | 
| @@ -520,6 +520,9 @@ | ||
| 520 | 520 | $this->_hash = hash_final($this->_hashHandler, true); | 
| 521 | 521 | } | 
| 522 | 522 | |
| 523 | + /** | |
| 524 | + * @param string $string | |
| 525 | + */ | |
| 523 | 526 | private function _addToHash($string) | 
| 524 | 527 |      { | 
| 525 | 528 | $this->_canonData .= $string; | 
| @@ -510,7 +510,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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); | 
| @@ -779,9 +779,9 @@ discard block | ||
| 779 | 779 | } | 
| 780 | 780 | |
| 781 | 781 |          if ($this->_passphrase) { | 
| 782 | - $pkeyId = openssl_get_privatekey($this->_privateKey, $this->_passphrase); | |
| 782 | + $pkeyId = openssl_get_privatekey($this->_privateKey, $this->_passphrase); | |
| 783 | 783 |          } else { | 
| 784 | - $pkeyId = openssl_get_privatekey($this->_privateKey); | |
| 784 | + $pkeyId = openssl_get_privatekey($this->_privateKey); | |
| 785 | 785 | } | 
| 786 | 786 |          if (!$pkeyId) { | 
| 787 | 787 |              throw new Swift_SwiftException('Unable to load DKIM Private Key [' . openssl_error_string() . ']'); | 
| @@ -248,10 +248,10 @@ discard block | ||
| 248 | 248 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ | 
| 249 | 249 | /** @noinspection UsageOfSilenceOperatorInspection */ | 
| 250 | 250 | @uasort($assoc, array($this, '_sortHandlers')); | 
| 251 | - $this->_handlers = $assoc; | |
| 252 | - $this->_setHandlerParams(); | |
| 251 | + $this->_handlers = $assoc; | |
| 252 | + $this->_setHandlerParams(); | |
| 253 | 253 | |
| 254 | - return $this; | |
| 254 | + return $this; | |
| 255 | 255 | } | 
| 256 | 256 | |
| 257 | 257 | /** | 
| @@ -325,7 +325,7 @@ discard block | ||
| 325 | 325 | return $this; | 
| 326 | 326 | } | 
| 327 | 327 | |
| 328 | - return $return; | |
| 328 | + return $return; | |
| 329 | 329 | } | 
| 330 | 330 | } | 
| 331 | 331 | |