@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | protected function loadOptionalSegmentInformation($options) |
| 71 | 71 | { |
| 72 | - if (! empty($options->operatingCompany)) { |
|
| 72 | + if (!empty($options->operatingCompany)) { |
|
| 73 | 73 | $this->flightDetails->companyDetails->operatingCompany = $options->operatingCompany; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $this->flightDetails->flightDate->setArrivalDate($options->arrivalDate); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if (! empty($options->groupNumber)) { |
|
| 80 | + if (!empty($options->groupNumber)) { |
|
| 81 | 81 | $this->flightDetails->flightTypeDetails = new FlightTypeDetails($options->groupNumber); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -185,6 +185,6 @@ |
||
| 185 | 185 | |
| 186 | 186 | $monthAndYear = strtoupper($dateOfBirth->format('My')); |
| 187 | 187 | |
| 188 | - return $day . $monthAndYear; |
|
| 188 | + return $day.$monthAndYear; |
|
| 189 | 189 | } |
| 190 | 190 | } |
@@ -516,7 +516,7 @@ |
||
| 516 | 516 | /** |
| 517 | 517 | * Check is called message is not Security_Authenticate. |
| 518 | 518 | * |
| 519 | - * @param $messageName |
|
| 519 | + * @param string $messageName |
|
| 520 | 520 | * @return bool |
| 521 | 521 | */ |
| 522 | 522 | protected function isNotSecurityAuthenticateMessage($messageName) |
@@ -412,10 +412,10 @@ discard block |
||
| 412 | 412 | $charId = strtoupper(md5(uniqid(rand(), true))); |
| 413 | 413 | $hyphen = chr(45); // "-" |
| 414 | 414 | |
| 415 | - $uuid = substr($charId, 0, 8) . $hyphen |
|
| 416 | - . substr($charId, 8, 4) . $hyphen |
|
| 417 | - . substr($charId, 12, 4) . $hyphen |
|
| 418 | - . substr($charId, 16, 4) . $hyphen |
|
| 415 | + $uuid = substr($charId, 0, 8).$hyphen |
|
| 416 | + . substr($charId, 8, 4).$hyphen |
|
| 417 | + . substr($charId, 12, 4).$hyphen |
|
| 418 | + . substr($charId, 16, 4).$hyphen |
|
| 419 | 419 | . substr($charId, 20, 12); |
| 420 | 420 | |
| 421 | 421 | return $uuid; |
@@ -432,10 +432,10 @@ discard block |
||
| 432 | 432 | { |
| 433 | 433 | return $xml = '<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> |
| 434 | 434 | <oas:UsernameToken xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" oas1:Id="UsernameToken-1"> |
| 435 | - <oas:Username>' . $originator . '</oas:Username> |
|
| 436 | - <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce . '</oas:Nonce> |
|
| 437 | - <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest . '</oas:Password> |
|
| 438 | - <oas1:Created>' . $creationTimeString . '</oas1:Created> |
|
| 435 | + <oas:Username>' . $originator.'</oas:Username> |
|
| 436 | + <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce.'</oas:Nonce> |
|
| 437 | + <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest.'</oas:Password> |
|
| 438 | + <oas1:Created>' . $creationTimeString.'</oas1:Created> |
|
| 439 | 439 | </oas:UsernameToken> |
| 440 | 440 | </oas:Security>'; |
| 441 | 441 | } |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | { |
| 451 | 451 | return substr( |
| 452 | 452 | sha1( |
| 453 | - $nonceBase . $creationString, |
|
| 453 | + $nonceBase.$creationString, |
|
| 454 | 454 | true |
| 455 | 455 | ), |
| 456 | 456 | 0, |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | */ |
| 480 | 480 | protected function generatePasswordDigest($password, $creationString, $messageNonce) |
| 481 | 481 | { |
| 482 | - return base64_encode(sha1($messageNonce . $creationString . sha1($password, true), true)); |
|
| 482 | + return base64_encode(sha1($messageNonce.$creationString.sha1($password, true), true)); |
|
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | /** |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | { |
| 492 | 492 | $creationDateTime->setTimezone(new \DateTimeZone('UTC')); |
| 493 | 493 | |
| 494 | - return $creationDateTime->format("Y-m-d\TH:i:s:") . $micro . 'Z'; |
|
| 494 | + return $creationDateTime->format("Y-m-d\TH:i:s:").$micro.'Z'; |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /** |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * @param FareMasterPricerExSearch|FareMasterPricerCalendarOptions|TicketAtcShopperMpExSearchOptions $options |
|
| 117 | + * @param FareMasterPricerCalendarOptions $options |
|
| 118 | 118 | */ |
| 119 | 119 | protected function loadOptions($options) |
| 120 | 120 | { |
@@ -26,7 +26,6 @@ |
||
| 26 | 26 | use Amadeus\Client\RequestOptions\Fare\MPItinerary; |
| 27 | 27 | use Amadeus\Client\RequestOptions\FareMasterPricerCalendarOptions; |
| 28 | 28 | use Amadeus\Client\RequestOptions\FareMasterPricerExSearchOptions; |
| 29 | -use Amadeus\Client\RequestOptions\TicketAtcShopperMpTbSearchOptions; |
|
| 30 | 29 | use Amadeus\Client\Struct\Fare\MasterPricer; |
| 31 | 30 | |
| 32 | 31 | /** |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * @param string $messageName |
| 239 | 239 | * @param string $lastResponse |
| 240 | 240 | * @param array $messageOptions |
| 241 | - * @param mixed $result |
|
| 241 | + * @param SendResult $result |
|
| 242 | 242 | */ |
| 243 | 243 | abstract protected function handlePostMessage($messageName, $lastResponse, $messageOptions, $result); |
| 244 | 244 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | /** |
| 328 | 328 | * Get the version number active in the WSDL for the given message |
| 329 | 329 | * |
| 330 | - * @param $messageName |
|
| 330 | + * @param string $messageName |
|
| 331 | 331 | * @return float|string|null |
| 332 | 332 | */ |
| 333 | 333 | protected function getActiveVersionFor($messageName) |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | /** |
| 347 | 347 | * Get the WSDL ID for the given message |
| 348 | 348 | * |
| 349 | - * @param $messageName |
|
| 349 | + * @param string $messageName |
|
| 350 | 350 | * @return string|null |
| 351 | 351 | */ |
| 352 | 352 | protected function getWsdlIdFor($messageName) |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * Extracts the message content from the soap envelope (i.e. everything under the soap body) |
| 35 | 35 | * |
| 36 | 36 | * @param string $soapResponse |
| 37 | - * @return string|null |
|
| 37 | + * @return boolean|string |
|
| 38 | 38 | */ |
| 39 | 39 | public function extract($soapResponse) |
| 40 | 40 | { |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * Get substring between two strings |
| 54 | 54 | * |
| 55 | - * @param $string |
|
| 56 | - * @param $start |
|
| 57 | - * @param $end |
|
| 55 | + * @param string $string |
|
| 56 | + * @param string $start |
|
| 57 | + * @param string $end |
|
| 58 | 58 | * @return bool|string |
| 59 | 59 | */ |
| 60 | 60 | private function getStringBetween($string, $start, $end) |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | ); |
| 215 | 215 | |
| 216 | 216 | if ($opt->anchoredSegments) { |
| 217 | - $tmpItinerary->flightInfoPNR = array_map(function ($anchoredSegment) { |
|
| 217 | + $tmpItinerary->flightInfoPNR = array_map(function($anchoredSegment) { |
|
| 218 | 218 | return new MasterPricer\FlightInfoPNR( |
| 219 | 219 | $anchoredSegment |
| 220 | 220 | ); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function __construct($options) |
| 66 | 66 | { |
| 67 | - if (! is_null($options)) { |
|
| 67 | + if (!is_null($options)) { |
|
| 68 | 68 | $this->loadPassengers($options->passengers); |
| 69 | 69 | |
| 70 | 70 | $this->loadFlightDetails($options->segments); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $counter = 1; |
| 83 | 83 | foreach ($passengers as $passenger) { |
| 84 | 84 | $this->passengerInfoGroup[] = new PassengerInfoGroup($passenger, $counter); |
| 85 | - $counter ++; |
|
| 85 | + $counter++; |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function __construct($options) |
| 28 | 28 | { |
| 29 | 29 | foreach ($options->referenceGroups as $referenceGroup) { |
| 30 | - $references = array_map(function (Reference $reference) { |
|
| 30 | + $references = array_map(function(Reference $reference) { |
|
| 31 | 31 | return new ReferenceDetails( |
| 32 | 32 | $reference->getType(), |
| 33 | 33 | $reference->getValue() |