@@ -278,8 +278,7 @@ discard block |
||
| 278 | 278 | //We are authenticated and stateful: provide session header to continue or terminate session |
| 279 | 279 | $statusCode = |
| 280 | 280 | (isset($messageOptions['endSession']) && $messageOptions['endSession'] === true) ? |
| 281 | - "End" : |
|
| 282 | - "InSeries"; |
|
| 281 | + "End" : "InSeries"; |
|
| 283 | 282 | |
| 284 | 283 | array_push( |
| 285 | 284 | $headersToSet, |
@@ -344,14 +343,14 @@ discard block |
||
| 344 | 343 | */ |
| 345 | 344 | protected function generateGuid() |
| 346 | 345 | { |
| 347 | - mt_srand((double)microtime()*10000); |
|
| 346 | + mt_srand((double) microtime() * 10000); |
|
| 348 | 347 | $charId = strtoupper(md5(uniqid(rand(), true))); |
| 349 | 348 | $hyphen = chr(45); // "-" |
| 350 | 349 | |
| 351 | - $uuid = substr($charId, 0, 8) . $hyphen |
|
| 352 | - .substr($charId, 8, 4) . $hyphen |
|
| 353 | - .substr($charId, 12, 4) . $hyphen |
|
| 354 | - .substr($charId, 16, 4) . $hyphen |
|
| 350 | + $uuid = substr($charId, 0, 8).$hyphen |
|
| 351 | + .substr($charId, 8, 4).$hyphen |
|
| 352 | + .substr($charId, 12, 4).$hyphen |
|
| 353 | + .substr($charId, 16, 4).$hyphen |
|
| 355 | 354 | .substr($charId, 20, 12); |
| 356 | 355 | |
| 357 | 356 | return $uuid; |
@@ -368,10 +367,10 @@ discard block |
||
| 368 | 367 | { |
| 369 | 368 | return $xml = '<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> |
| 370 | 369 | <oas:UsernameToken xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" oas1:Id="UsernameToken-1"> |
| 371 | - <oas:Username>' . $originator . '</oas:Username> |
|
| 372 | - <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce . '</oas:Nonce> |
|
| 373 | - <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest . '</oas:Password> |
|
| 374 | - <oas1:Created>' . $creationTimeString . '</oas1:Created> |
|
| 370 | + <oas:Username>' . $originator.'</oas:Username> |
|
| 371 | + <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce.'</oas:Nonce> |
|
| 372 | + <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest.'</oas:Password> |
|
| 373 | + <oas1:Created>' . $creationTimeString.'</oas1:Created> |
|
| 375 | 374 | </oas:UsernameToken> |
| 376 | 375 | </oas:Security>'; |
| 377 | 376 | } |
@@ -386,7 +385,7 @@ discard block |
||
| 386 | 385 | { |
| 387 | 386 | return substr( |
| 388 | 387 | sha1( |
| 389 | - $nonceBase . $creationString, |
|
| 388 | + $nonceBase.$creationString, |
|
| 390 | 389 | true |
| 391 | 390 | ), |
| 392 | 391 | 0, |
@@ -414,7 +413,7 @@ discard block |
||
| 414 | 413 | */ |
| 415 | 414 | protected function generatePasswordDigest($password, $creationString, $messageNonce) |
| 416 | 415 | { |
| 417 | - return base64_encode(sha1($messageNonce . $creationString . sha1($password, true), true)); |
|
| 416 | + return base64_encode(sha1($messageNonce.$creationString.sha1($password, true), true)); |
|
| 418 | 417 | } |
| 419 | 418 | |
| 420 | 419 | /** |
@@ -425,7 +424,7 @@ discard block |
||
| 425 | 424 | protected function createDateTimeStringForAuth($creationDateTime, $micro) |
| 426 | 425 | { |
| 427 | 426 | $creationDateTime->setTimezone(new \DateTimeZone('UTC')); |
| 428 | - return $creationDateTime->format("Y-m-d\TH:i:s:") . $micro . 'Z'; |
|
| 427 | + return $creationDateTime->format("Y-m-d\TH:i:s:").$micro.'Z'; |
|
| 429 | 428 | } |
| 430 | 429 | |
| 431 | 430 | /** |
@@ -446,9 +446,9 @@ discard block |
||
| 446 | 446 | */ |
| 447 | 447 | protected function extractMessageVersion($fullVersionString) |
| 448 | 448 | { |
| 449 | - $marker = strpos($fullVersionString, '_', strpos($fullVersionString, '_')+1); |
|
| 449 | + $marker = strpos($fullVersionString, '_', strpos($fullVersionString, '_') + 1); |
|
| 450 | 450 | |
| 451 | - $num = substr($fullVersionString, $marker+1); |
|
| 451 | + $num = substr($fullVersionString, $marker + 1); |
|
| 452 | 452 | |
| 453 | 453 | return str_replace('_', '.', $num); |
| 454 | 454 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | 'http://schemas.xmlsoap.org/wsdl/soap/' |
| 481 | 481 | ); |
| 482 | 482 | } else { |
| 483 | - throw new Client\InvalidWsdlFileException('WSDL ' . $wsdlFilePath . ' could not be loaded'); |
|
| 483 | + throw new Client\InvalidWsdlFileException('WSDL '.$wsdlFilePath.' could not be loaded'); |
|
| 484 | 484 | } |
| 485 | 485 | } |
| 486 | 486 | } |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $domDoc = null; |
| 568 | 568 | $domXpath = null; |
| 569 | 569 | |
| 570 | - $importPath = realpath(dirname($wsdlPath)) . DIRECTORY_SEPARATOR . $import; |
|
| 570 | + $importPath = realpath(dirname($wsdlPath)).DIRECTORY_SEPARATOR.$import; |
|
| 571 | 571 | $wsdlContent = file_get_contents($importPath); |
| 572 | 572 | |
| 573 | 573 | if ($wsdlContent !== false) { |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | ); |
| 587 | 587 | } |
| 588 | 588 | } else { |
| 589 | - throw new Client\InvalidWsdlFileException('WSDL ' . $importPath . ' import could not be loaded'); |
|
| 589 | + throw new Client\InvalidWsdlFileException('WSDL '.$importPath.' import could not be loaded'); |
|
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | if ($domXpath instanceof \DOMXPath) { |
@@ -620,11 +620,11 @@ discard block |
||
| 620 | 620 | { |
| 621 | 621 | $this->log( |
| 622 | 622 | LogLevel::INFO, |
| 623 | - 'Called ' . $messageName . ' with request: ' . $this->getSoapClient($messageName)->__getLastRequest() |
|
| 623 | + 'Called '.$messageName.' with request: '.$this->getSoapClient($messageName)->__getLastRequest() |
|
| 624 | 624 | ); |
| 625 | 625 | $this->log( |
| 626 | 626 | LogLevel::INFO, |
| 627 | - 'Response: ' . $this->getSoapClient($messageName)->__getLastResponse() |
|
| 627 | + 'Response: '.$this->getSoapClient($messageName)->__getLastResponse() |
|
| 628 | 628 | ); |
| 629 | 629 | } |
| 630 | 630 | |