@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | const TYPE_CHILD = "CH"; |
38 | 38 | |
39 | - const TYPE_INFANT= "INF"; |
|
39 | + const TYPE_INFANT = "INF"; |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * What type of passengers? self::TYPE_* |
@@ -30,33 +30,33 @@ discard block |
||
30 | 30 | */ |
31 | 31 | class Passenger |
32 | 32 | { |
33 | - const PASST_ADULT = "ADT"; |
|
34 | - const PASST_INFANT = "INF"; |
|
35 | - const PASST_CHILD = "CHD"; |
|
33 | + const PASST_ADULT = "ADT"; |
|
34 | + const PASST_INFANT = "INF"; |
|
35 | + const PASST_CHILD = "CHD"; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * 1: Infant (INF) No more info in Edifact. |
39 | 39 | */ |
40 | - const INF_NOINFO = 1; |
|
40 | + const INF_NOINFO = 1; |
|
41 | 41 | /** |
42 | 42 | * 2: Infant given name only (INF/BILL) Infant given name will be placed |
43 | 43 | * in a 2nd occurence of C324 of this (adult) passenger TIF. |
44 | 44 | * The 2nd C324/6353 element will contain INF. |
45 | 45 | */ |
46 | - const INF_GIVEN = 2; |
|
46 | + const INF_GIVEN = 2; |
|
47 | 47 | /** |
48 | 48 | * 3: Infant given and last name (INFGATES/BILL) Infant is treated as a |
49 | 49 | * separate TIF following immediately this (adult) passenger TIF. |
50 | 50 | * This following TIF C324/6353 element will contain INF. |
51 | 51 | */ |
52 | - const INF_FULL = 3; |
|
52 | + const INF_FULL = 3; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @var string |
56 | 56 | */ |
57 | - public $firstName; |
|
57 | + public $firstName; |
|
58 | 58 | |
59 | - /* |
|
59 | + /* |
|
60 | 60 | * self::PASST_* |
61 | 61 | * |
62 | 62 | * Passenger Types: |
@@ -231,26 +231,26 @@ discard block |
||
231 | 231 | * |
232 | 232 | * @var string |
233 | 233 | */ |
234 | - public $type; |
|
234 | + public $type; |
|
235 | 235 | |
236 | - /* |
|
236 | + /* |
|
237 | 237 | * self::INF_* |
238 | 238 | * |
239 | 239 | * @var string|int |
240 | 240 | */ |
241 | - public $infantIndicator; |
|
241 | + public $infantIndicator; |
|
242 | 242 | |
243 | 243 | /** |
244 | 244 | * @var string |
245 | 245 | */ |
246 | - public $identificationCode; |
|
246 | + public $identificationCode; |
|
247 | 247 | |
248 | 248 | /** |
249 | 249 | * Passenger constructor. |
250 | 250 | * @param $firstName |
251 | 251 | * @param $type |
252 | 252 | */ |
253 | - public function __construct($firstName, $type) |
|
253 | + public function __construct($firstName, $type) |
|
254 | 254 | { |
255 | 255 | $this->firstName = $firstName; |
256 | 256 | $this->type = $type; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | class Scroll |
32 | 32 | { |
33 | 33 | /** |
34 | - * @var NumberOfItemsDetails |
|
35 | - */ |
|
34 | + * @var NumberOfItemsDetails |
|
35 | + */ |
|
36 | 36 | public $numberOfItemsDetails; |
37 | 37 | } |
38 | 38 | \ No newline at end of file |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * |
61 | 61 | * @param FareConvertCurrencyOptions $params |
62 | 62 | */ |
63 | - public function __construct (FareConvertCurrencyOptions $params) |
|
63 | + public function __construct(FareConvertCurrencyOptions $params) |
|
64 | 64 | { |
65 | 65 | $this->message = new MsgType(MessageFunctionDetails::FARE_CURRENCY_CONVERSION); |
66 | 66 |
@@ -23,7 +23,6 @@ |
||
23 | 23 | namespace Amadeus\Client\Session\Handler; |
24 | 24 | |
25 | 25 | use Amadeus\Client; |
26 | -use Psr\Log\LogLevel; |
|
27 | 26 | |
28 | 27 | /** |
29 | 28 | * SoapHeader4: Session Handler for web service applications using Amadeus WS Soap Header v4. |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $password = base64_decode($params->authParams->passwordData); |
222 | 222 | $creation = new \DateTime('now', new \DateTimeZone('UTC')); |
223 | 223 | $t = microtime(true); |
224 | - $micro = sprintf("%03d",($t - floor($t)) * 1000); |
|
224 | + $micro = sprintf("%03d", ($t - floor($t)) * 1000); |
|
225 | 225 | $creationString = $this->createDateTimeStringForAuth($creation, $micro); |
226 | 226 | $messageNonce = $this->generateUniqueNonce($params->authParams->nonceBase, $creationString); |
227 | 227 | $encodedNonce = base64_encode($messageNonce); |
@@ -277,8 +277,7 @@ discard block |
||
277 | 277 | //We are authenticated and stateful: provide session header to continue or terminate session |
278 | 278 | $statusCode = |
279 | 279 | (isset($messageOptions['endSession']) && $messageOptions['endSession'] === true) ? |
280 | - "End" : |
|
281 | - "InSeries"; |
|
280 | + "End" : "InSeries"; |
|
282 | 281 | |
283 | 282 | array_push( |
284 | 283 | $headersToSet, |
@@ -335,15 +334,15 @@ discard block |
||
335 | 334 | if (function_exists('com_create_guid')) { |
336 | 335 | return com_create_guid(); |
337 | 336 | } else { |
338 | - mt_srand((double)microtime()*10000); |
|
337 | + mt_srand((double) microtime() * 10000); |
|
339 | 338 | $charId = strtoupper(md5(uniqid(rand(), true))); |
340 | 339 | $hyphen = chr(45); // "-" |
341 | 340 | |
342 | - $uuid = substr($charId, 0, 8) . $hyphen |
|
343 | - .substr($charId, 8, 4) . $hyphen |
|
344 | - .substr($charId,12, 4) . $hyphen |
|
345 | - .substr($charId,16, 4) . $hyphen |
|
346 | - .substr($charId,20,12); |
|
341 | + $uuid = substr($charId, 0, 8).$hyphen |
|
342 | + .substr($charId, 8, 4).$hyphen |
|
343 | + .substr($charId, 12, 4).$hyphen |
|
344 | + .substr($charId, 16, 4).$hyphen |
|
345 | + .substr($charId, 20, 12); |
|
347 | 346 | |
348 | 347 | return $uuid; |
349 | 348 | } |
@@ -360,10 +359,10 @@ discard block |
||
360 | 359 | { |
361 | 360 | return $xml = '<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> |
362 | 361 | <oas:UsernameToken xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" oas1:Id="UsernameToken-1"> |
363 | - <oas:Username>' . $originator . '</oas:Username> |
|
364 | - <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce . '</oas:Nonce> |
|
365 | - <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest . '</oas:Password> |
|
366 | - <oas1:Created>' . $creationTimeString . '</oas1:Created> |
|
362 | + <oas:Username>' . $originator.'</oas:Username> |
|
363 | + <oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' . $nonce.'</oas:Nonce> |
|
364 | + <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' . $pwDigest.'</oas:Password> |
|
365 | + <oas1:Created>' . $creationTimeString.'</oas1:Created> |
|
367 | 366 | </oas:UsernameToken> |
368 | 367 | </oas:Security>'; |
369 | 368 | } |
@@ -378,7 +377,7 @@ discard block |
||
378 | 377 | { |
379 | 378 | return substr( |
380 | 379 | sha1( |
381 | - $nonceBase . $creationString, |
|
380 | + $nonceBase.$creationString, |
|
382 | 381 | true |
383 | 382 | ), |
384 | 383 | 0, |
@@ -406,7 +405,7 @@ discard block |
||
406 | 405 | */ |
407 | 406 | protected function generatePasswordDigest($password, $creationString, $messageNonce) |
408 | 407 | { |
409 | - return base64_encode(sha1($messageNonce . $creationString . sha1($password, true), true)); |
|
408 | + return base64_encode(sha1($messageNonce.$creationString.sha1($password, true), true)); |
|
410 | 409 | } |
411 | 410 | |
412 | 411 | /** |
@@ -417,7 +416,7 @@ discard block |
||
417 | 416 | protected function createDateTimeStringForAuth($creationDateTime, $micro) |
418 | 417 | { |
419 | 418 | $creationDateTime->setTimezone(new \DateTimeZone('UTC')); |
420 | - return $creationDateTime->format("Y-m-d\TH:i:s:") . $micro . 'Z'; |
|
419 | + return $creationDateTime->format("Y-m-d\TH:i:s:").$micro.'Z'; |
|
421 | 420 | } |
422 | 421 | |
423 | 422 | /** |
@@ -191,7 +191,7 @@ |
||
191 | 191 | $this->requestCreator = $this->loadRequestCreator( |
192 | 192 | $params->requestCreator, |
193 | 193 | $params->requestCreatorParams, |
194 | - self::receivedFromIdentifier . "-" .self::version, |
|
194 | + self::receivedFromIdentifier."-".self::version, |
|
195 | 195 | $this->sessionHandler->getOriginatorOffice(), |
196 | 196 | $this->sessionHandler->getMessagesAndVersions() |
197 | 197 | ); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function analyzeResponse($sendResult, $messageName) |
55 | 55 | { |
56 | - $methodName = 'analyze' . str_replace('_', '', ucfirst($messageName)) . 'Response'; |
|
56 | + $methodName = 'analyze'.str_replace('_', '', ucfirst($messageName)).'Response'; |
|
57 | 57 | |
58 | 58 | if (!empty($sendResult->exception)) { |
59 | 59 | return $this->makeResultForException($sendResult); |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | $msgNode = $domXpath->query('//m:errorsDescription/m:errorWarningDescription/m:freeText')->item(0); |
546 | 546 | |
547 | 547 | if ($msgNode instanceof \DOMNode) { |
548 | - if (trim($msgNode->nodeValue) === "OFFER CONFIRMED SUCCESSFULLY" || trim($msgNode->nodeValue) === "OFFER VERIFIED SUCCESSFULLY" ) { |
|
548 | + if (trim($msgNode->nodeValue) === "OFFER CONFIRMED SUCCESSFULLY" || trim($msgNode->nodeValue) === "OFFER VERIFIED SUCCESSFULLY") { |
|
549 | 549 | $analyzeResponse->messages[] = new Result\NotOk( |
550 | 550 | 0, |
551 | 551 | trim($msgNode->nodeValue) |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | $errorMessage = (array_key_exists($errorCode, $recognizedErrors)) ? $recognizedErrors[$errorCode] : ''; |
714 | 714 | |
715 | 715 | if ($errorMessage === '') { |
716 | - $errorMessage = "QUEUE ERROR '" . $errorCode . "' (Error message unavailable)"; |
|
716 | + $errorMessage = "QUEUE ERROR '".$errorCode."' (Error message unavailable)"; |
|
717 | 717 | } |
718 | 718 | |
719 | 719 | return $errorMessage; |
@@ -39,14 +39,14 @@ |
||
39 | 39 | public static function generateSomewhatRandomString($length = 22) |
40 | 40 | { |
41 | 41 | $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; |
42 | - srand((double)microtime()*1000000); |
|
42 | + srand((double) microtime() * 1000000); |
|
43 | 43 | $i = 0; |
44 | - $somewhatRandom = '' ; |
|
44 | + $somewhatRandom = ''; |
|
45 | 45 | |
46 | 46 | while ($i < $length) { |
47 | 47 | $num = rand() % 60; |
48 | 48 | $tmp = substr($chars, $num, 1); |
49 | - $somewhatRandom = $somewhatRandom . $tmp; |
|
49 | + $somewhatRandom = $somewhatRandom.$tmp; |
|
50 | 50 | $i++; |
51 | 51 | } |
52 | 52 |
@@ -41,55 +41,55 @@ |
||
41 | 41 | */ |
42 | 42 | public $reference; |
43 | 43 | /** |
44 | - * PNR_AddMultiElements/originDestinationDetails/itineraryInfo/elementManagementItinerary/segmentName |
|
45 | - * |
|
46 | - * AB Billing Address element |
|
47 | - * ABU Unstructured Billing Address element |
|
48 | - * AI Accounting Information element |
|
49 | - * AIR Air segment |
|
50 | - * AM Mailing address element |
|
51 | - * AMU Unstructured Mailing Address Element |
|
52 | - * AP Contact element |
|
53 | - * AU ATX - Non-automated Air Taxi auxiliary segment |
|
54 | - * CU Non-automated Car auxiliary segment |
|
55 | - * ES Individual PNR Security element |
|
56 | - * FD Fare Discount element |
|
57 | - * FE Endorsements / Restrictions element |
|
58 | - * FF Frequent Flyer entry |
|
59 | - * FH Manual Document Registration element |
|
60 | - * FHA Automated ticket number |
|
61 | - * FHE Electronic ticket number |
|
62 | - * FHM Manual ticket number/document registration element |
|
63 | - * FK AIR destination |
|
64 | - * FM Commission element |
|
65 | - * FO Original Issue / Issue in Exchange For element |
|
66 | - * FP Form of Payment element |
|
67 | - * FS Miscellaneous Ticketing Information element |
|
68 | - * FT Tour Code element |
|
69 | - * FV Ticketing Carrier Designator element |
|
70 | - * FY Fare print override element |
|
71 | - * FZ Miscellaneous Information element |
|
72 | - * HU Non-automated Hotel auxiliary segment |
|
73 | - * NG Group Name element |
|
74 | - * NM Name element |
|
75 | - * NZ Non Commerciak PNR Name element |
|
76 | - * OP Option element |
|
77 | - * OS Other Special Information element |
|
78 | - * RC Confidential Remark element |
|
79 | - * RF Receive From element |
|
80 | - * RI Invoice remark |
|
81 | - * RM General Remark elementt |
|
82 | - * RQ Quality control remark element |
|
83 | - * RU Non-automated Miscellaneous auxiliary segment |
|
84 | - * RX Corporate Remark |
|
85 | - * SK Special Keyword elements |
|
86 | - * SSR SSR element |
|
87 | - * STR Seat Request |
|
88 | - * TK Ticket element |
|
89 | - * TU Non-automated Tour auxiliary segment |
|
90 | - * |
|
91 | - * @var string |
|
92 | - */ |
|
44 | + * PNR_AddMultiElements/originDestinationDetails/itineraryInfo/elementManagementItinerary/segmentName |
|
45 | + * |
|
46 | + * AB Billing Address element |
|
47 | + * ABU Unstructured Billing Address element |
|
48 | + * AI Accounting Information element |
|
49 | + * AIR Air segment |
|
50 | + * AM Mailing address element |
|
51 | + * AMU Unstructured Mailing Address Element |
|
52 | + * AP Contact element |
|
53 | + * AU ATX - Non-automated Air Taxi auxiliary segment |
|
54 | + * CU Non-automated Car auxiliary segment |
|
55 | + * ES Individual PNR Security element |
|
56 | + * FD Fare Discount element |
|
57 | + * FE Endorsements / Restrictions element |
|
58 | + * FF Frequent Flyer entry |
|
59 | + * FH Manual Document Registration element |
|
60 | + * FHA Automated ticket number |
|
61 | + * FHE Electronic ticket number |
|
62 | + * FHM Manual ticket number/document registration element |
|
63 | + * FK AIR destination |
|
64 | + * FM Commission element |
|
65 | + * FO Original Issue / Issue in Exchange For element |
|
66 | + * FP Form of Payment element |
|
67 | + * FS Miscellaneous Ticketing Information element |
|
68 | + * FT Tour Code element |
|
69 | + * FV Ticketing Carrier Designator element |
|
70 | + * FY Fare print override element |
|
71 | + * FZ Miscellaneous Information element |
|
72 | + * HU Non-automated Hotel auxiliary segment |
|
73 | + * NG Group Name element |
|
74 | + * NM Name element |
|
75 | + * NZ Non Commerciak PNR Name element |
|
76 | + * OP Option element |
|
77 | + * OS Other Special Information element |
|
78 | + * RC Confidential Remark element |
|
79 | + * RF Receive From element |
|
80 | + * RI Invoice remark |
|
81 | + * RM General Remark elementt |
|
82 | + * RQ Quality control remark element |
|
83 | + * RU Non-automated Miscellaneous auxiliary segment |
|
84 | + * RX Corporate Remark |
|
85 | + * SK Special Keyword elements |
|
86 | + * SSR SSR element |
|
87 | + * STR Seat Request |
|
88 | + * TK Ticket element |
|
89 | + * TU Non-automated Tour auxiliary segment |
|
90 | + * |
|
91 | + * @var string |
|
92 | + */ |
|
93 | 93 | public $segmentName; |
94 | 94 | |
95 | 95 | /** |