@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | protected function getSafeMapShareId() |
39 | 39 | { |
40 | - return get_class($this) . ($this->_dotEscape ? '.dotEscape' : ''); |
|
40 | + return get_class($this).($this->_dotEscape ? '.dotEscape' : ''); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | protected function initSafeMap() |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $newLineLength = $lineLen + ($i === false ? $size : $i); |
101 | 101 | |
102 | 102 | if ($currentLine && $newLineLength >= $thisLineLength) { |
103 | - $is->write($prepend . $this->_standardize($currentLine)); |
|
103 | + $is->write($prepend.$this->_standardize($currentLine)); |
|
104 | 104 | $currentLine = ''; |
105 | 105 | $prepend = "=\r\n"; |
106 | 106 | $thisLineLength = $maxLineLength; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | if ($currentLine !== '') { |
121 | - $is->write($prepend . $this->_standardize($currentLine)); |
|
121 | + $is->write($prepend.$this->_standardize($currentLine)); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | if ($atEOF) { |
47 | 47 | $streamTheseBytes = $base64ReadBufferRemainderBytes; |
48 | 48 | } else { |
49 | - $streamTheseBytes = $base64ReadBufferRemainderBytes . $readBytes; |
|
49 | + $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $base64ReadBufferRemainderBytes = null; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; |
72 | 72 | |
73 | 73 | while ($thisMaxLineLength < strlen($encoded)) { |
74 | - $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; |
|
74 | + $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; |
|
75 | 75 | $firstLineOffset = 0; |
76 | 76 | $encoded = substr($encoded, $thisMaxLineLength); |
77 | 77 | $thisMaxLineLength = $maxLineLength; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | $leftOver = ''; |
73 | 73 | while (false !== $bytes = $os->read(8192)) { |
74 | - $toencode = $leftOver . $bytes; |
|
74 | + $toencode = $leftOver.$bytes; |
|
75 | 75 | |
76 | 76 | if ($this->_canonical) { |
77 | 77 | $toencode = $this->_canonicalize($toencode); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if ( |
141 | 141 | $currentLine !== '' |
142 | 142 | && |
143 | - strlen($currentLine . $chunk) > $length |
|
143 | + strlen($currentLine.$chunk) > $length |
|
144 | 144 | ) { |
145 | 145 | $lines[] = ''; |
146 | 146 | $currentLine = &$lines[$lineCount++]; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
178 | 178 | { |
179 | 179 | $sent = 0; |
180 | - $failedRecipients = (array)$failedRecipients; |
|
180 | + $failedRecipients = (array) $failedRecipients; |
|
181 | 181 | |
182 | 182 | $evt = $this->_eventDispatcher->createSendEvent($this, $message); |
183 | 183 | if ($evt) { |
@@ -196,10 +196,10 @@ discard block |
||
196 | 196 | ); |
197 | 197 | } |
198 | 198 | |
199 | - $to = (array)$message->getTo(); |
|
200 | - $cc = (array)$message->getCc(); |
|
199 | + $to = (array) $message->getTo(); |
|
200 | + $cc = (array) $message->getCc(); |
|
201 | 201 | $tos = array_merge($to, $cc); |
202 | - $bcc = (array)$message->getBcc(); |
|
202 | + $bcc = (array) $message->getBcc(); |
|
203 | 203 | |
204 | 204 | $message->setBcc(array()); |
205 | 205 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | public function executeCommand($command, $codes = array(), &$failures = null) |
310 | 310 | { |
311 | - $failures = (array)$failures; |
|
311 | + $failures = (array) $failures; |
|
312 | 312 | $seq = $this->_buffer->write($command); |
313 | 313 | $response = $this->_getFullResponse($seq); |
314 | 314 | |
@@ -461,8 +461,8 @@ discard block |
||
461 | 461 | if (!$valid) { |
462 | 462 | $this->_throwException( |
463 | 463 | new Swift_TransportException( |
464 | - 'Expected response code ' . implode('/', $wanted) . ' but got code ' . |
|
465 | - '"' . $code . '", with message "' . $response . '"', |
|
464 | + 'Expected response code '.implode('/', $wanted).' but got code '. |
|
465 | + '"'.$code.'", with message "'.$response.'"', |
|
466 | 466 | $code |
467 | 467 | ) |
468 | 468 | ); |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | } |
183 | 183 | } |
184 | 184 | throw new Swift_TransportException( |
185 | - 'Failed to authenticate on SMTP server with username "' . |
|
186 | - $this->_username . '" using ' . $count . ' possible authenticators' |
|
185 | + 'Failed to authenticate on SMTP server with username "'. |
|
186 | + $this->_username.'" using '.$count.' possible authenticators' |
|
187 | 187 | ); |
188 | 188 | } |
189 | 189 | } |
@@ -260,6 +260,6 @@ discard block |
||
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
263 | - throw new Swift_TransportException('Auth mode ' . $mode . ' is invalid'); |
|
263 | + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); |
|
264 | 264 | } |
265 | 265 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $challenge = $agent->executeCommand("AUTH CRAM-MD5\r\n", array(334)); |
41 | 41 | $challenge = base64_decode(substr($challenge, 4)); |
42 | 42 | $message = base64_encode( |
43 | - $username . ' ' . $this->_getResponse($password, $challenge) |
|
43 | + $username.' '.$this->_getResponse($password, $challenge) |
|
44 | 44 | ); |
45 | 45 | $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); |
46 | 46 | |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); |
74 | 74 | $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); |
75 | 75 | |
76 | - $inner = pack('H32', md5($k_ipad . $challenge)); |
|
77 | - $digest = md5($k_opad . $inner); |
|
76 | + $inner = pack('H32', md5($k_ipad.$challenge)); |
|
77 | + $digest = md5($k_opad.$inner); |
|
78 | 78 | |
79 | 79 | return $digest; |
80 | 80 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | try { |
50 | 50 | $param = $this->constructXOAuth2Params($email, $token); |
51 | - $agent->executeCommand('AUTH XOAUTH2 ' . $param . "\r\n", array(235)); |
|
51 | + $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", array(235)); |
|
52 | 52 | |
53 | 53 | return true; |
54 | 54 | } catch (Swift_TransportException $e) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | // pad to $bits bit |
87 | 87 | $bin_length = strlen($bin); |
88 | 88 | if ($bin_length < $bits) { |
89 | - $bin = str_repeat('0', $bits - $bin_length) . $bin; |
|
89 | + $bin = str_repeat('0', $bits - $bin_length).$bin; |
|
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | // negative |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $bin = base_convert($si, 10, 2); |
95 | 95 | $bin_length = strlen($bin); |
96 | 96 | if ($bin_length > $bits) { |
97 | - $bin = str_repeat('1', $bits - $bin_length) . $bin; |
|
97 | + $bin = str_repeat('1', $bits - $bin_length).$bin; |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | list($domain, $username) = $this->getDomainAndUsername($username); |
201 | 201 | //$challenge, $context, $targetInfoH, $targetName, $domainName, $workstation, $DNSDomainName, $DNSServerName, $blob, $ter |
202 | - list($challenge, , , , , $workstation, , , $blob) = $this->parseMessage2($response); |
|
202 | + list($challenge,,,,, $workstation,,, $blob) = $this->parseMessage2($response); |
|
203 | 203 | |
204 | 204 | if (!$v2) { |
205 | 205 | // LMv1 |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $desKey1 = $this->createDesKey($key1); |
326 | 326 | $desKey2 = $this->createDesKey($key2); |
327 | 327 | |
328 | - $constantDecrypt = $this->createByte($this->desEncrypt(self::DESCONST, $desKey1) . $this->desEncrypt(self::DESCONST, $desKey2), 21, false); |
|
328 | + $constantDecrypt = $this->createByte($this->desEncrypt(self::DESCONST, $desKey1).$this->desEncrypt(self::DESCONST, $desKey2), 21, false); |
|
329 | 329 | |
330 | 330 | // SECOND PART |
331 | 331 | list($key1, $key2, $key3) = str_split($constantDecrypt, 7); |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $desKey2 = $this->createDesKey($key2); |
335 | 335 | $desKey3 = $this->createDesKey($key3); |
336 | 336 | |
337 | - return $this->desEncrypt($challenge, $desKey1) . $this->desEncrypt($challenge, $desKey2) . $this->desEncrypt($challenge, $desKey3); |
|
337 | + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | /** |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | $desKey2 = $this->createDesKey($key2); |
356 | 356 | $desKey3 = $this->createDesKey($key3); |
357 | 357 | |
358 | - return $this->desEncrypt($challenge, $desKey1) . $this->desEncrypt($challenge, $desKey2) . $this->desEncrypt($challenge, $desKey3); |
|
358 | + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); |
|
359 | 359 | } |
360 | 360 | |
361 | 361 | /** |
@@ -400,9 +400,9 @@ discard block |
||
400 | 400 | // if $password > 15 than we can't use this method |
401 | 401 | if (strlen($password) <= 15) { |
402 | 402 | $ntlmHash = $this->md4Encrypt($password); |
403 | - $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username) . $domain)); |
|
403 | + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); |
|
404 | 404 | |
405 | - $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge . $client) . $client); |
|
405 | + $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge.$client).$client); |
|
406 | 406 | } |
407 | 407 | |
408 | 408 | return $this->createByte($lmPass, 24); |
@@ -426,14 +426,14 @@ discard block |
||
426 | 426 | protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client) |
427 | 427 | { |
428 | 428 | $ntlmHash = $this->md4Encrypt($password); |
429 | - $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username) . $domain)); |
|
429 | + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); |
|
430 | 430 | |
431 | 431 | // create blob |
432 | 432 | $blob = $this->createBlob($timestamp, $client, $targetInfo); |
433 | 433 | |
434 | - $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge . $blob); |
|
434 | + $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge.$blob); |
|
435 | 435 | |
436 | - return $ntlmv2Response . $blob; |
|
436 | + return $ntlmv2Response.$blob; |
|
437 | 437 | } |
438 | 438 | |
439 | 439 | protected function createDesKey($key) |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | $len = strlen($key); |
443 | 443 | for ($i = 1; $i < $len; ++$i) { |
444 | 444 | list($high, $low) = str_split(bin2hex($key[$i])); |
445 | - $v = $this->castToByte(ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf) . dechex(hexdec($low) & 0xf)), $i)); |
|
445 | + $v = $this->castToByte(ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xf)), $i)); |
|
446 | 446 | $material[] = str_pad(substr(dechex($v), -2), 2, '0', STR_PAD_LEFT); // cast to byte |
447 | 447 | } |
448 | 448 | $material[] = str_pad(substr(dechex($this->castToByte(ord($key[6]) << 1)), -2), 2, '0'); |
@@ -465,9 +465,9 @@ discard block |
||
465 | 465 | list($high, $low) = str_split($v); |
466 | 466 | |
467 | 467 | if ($needsParity) { |
468 | - $material[$k] = dechex(hexdec($high) | 0x0) . dechex(hexdec($low) | 0x1); |
|
468 | + $material[$k] = dechex(hexdec($high) | 0x0).dechex(hexdec($low) | 0x1); |
|
469 | 469 | } else { |
470 | - $material[$k] = dechex(hexdec($high) & 0xf) . dechex(hexdec($low) & 0xe); |
|
470 | + $material[$k] = dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xe); |
|
471 | 471 | } |
472 | 472 | } |
473 | 473 | |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | $length = $is16 ? $length / 2 : $length; |
491 | 491 | $length = $this->createByte(str_pad(dechex($length), 2, '0', STR_PAD_LEFT), 2); |
492 | 492 | |
493 | - return $length . $length . $this->createByte(dechex($offset), 4); |
|
493 | + return $length.$length.$this->createByte(dechex($offset), 4); |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | /** |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $ipadk = $key ^ str_repeat("\x36", $blocksize); |
613 | 613 | $opadk = $key ^ str_repeat("\x5c", $blocksize); |
614 | 614 | |
615 | - return pack('H*', md5($opadk . pack('H*', md5($ipadk . $msg)))); |
|
615 | + return pack('H*', md5($opadk.pack('H*', md5($ipadk.$msg)))); |
|
616 | 616 | } |
617 | 617 | |
618 | 618 | /** |
@@ -666,8 +666,8 @@ discard block |
||
666 | 666 | { |
667 | 667 | $message = bin2hex($message); |
668 | 668 | $messageId = substr($message, 16, 8); |
669 | - echo substr($message, 0, 16) . " NTLMSSP Signature<br />\n"; |
|
670 | - echo $messageId . " Type Indicator<br />\n"; |
|
669 | + echo substr($message, 0, 16)." NTLMSSP Signature<br />\n"; |
|
670 | + echo $messageId." Type Indicator<br />\n"; |
|
671 | 671 | |
672 | 672 | if ($messageId === '02000000') { |
673 | 673 | $map = array( |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | $data = $this->parseMessage2($this->hex2bin($message)); |
687 | 687 | |
688 | 688 | foreach ($map as $key => $value) { |
689 | - echo bin2hex($data[$key]) . ' - ' . $data[$key] . ' ||| ' . $value . "<br />\n"; |
|
689 | + echo bin2hex($data[$key]).' - '.$data[$key].' ||| '.$value."<br />\n"; |
|
690 | 690 | } |
691 | 691 | } elseif ($messageId === '03000000') { |
692 | 692 | $i = 0; |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | ); |
730 | 730 | |
731 | 731 | foreach ($map as $key => $value) { |
732 | - echo $data[$key] . ' - ' . $this->hex2bin($data[$key]) . ' ||| ' . $value . "<br />\n"; |
|
732 | + echo $data[$key].' - '.$this->hex2bin($data[$key]).' ||| '.$value."<br />\n"; |
|
733 | 733 | } |
734 | 734 | } |
735 | 735 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) |
38 | 38 | { |
39 | 39 | try { |
40 | - $message = base64_encode($username . chr(0) . $username . chr(0) . $password); |
|
40 | + $message = base64_encode($username.chr(0).$username.chr(0).$password); |
|
41 | 41 | $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); |
42 | 42 | |
43 | 43 | return true; |