@@ -32,35 +32,35 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | class Retrieve extends BaseWsMessage |
| 34 | 34 | { |
| 35 | - /** |
|
| 36 | - * Definition for retrieval type: by record locator |
|
| 37 | - * |
|
| 38 | - * see Amadeus Core Webservices documentation |
|
| 39 | - * [Retrieval type, coded codesets (Ref: 109P 1A 00.1.1)] |
|
| 40 | - * @var int |
|
| 41 | - */ |
|
| 42 | - const RETR_TYPE_BY_RECLOC = 2; |
|
| 35 | + /** |
|
| 36 | + * Definition for retrieval type: by record locator |
|
| 37 | + * |
|
| 38 | + * see Amadeus Core Webservices documentation |
|
| 39 | + * [Retrieval type, coded codesets (Ref: 109P 1A 00.1.1)] |
|
| 40 | + * @var int |
|
| 41 | + */ |
|
| 42 | + const RETR_TYPE_BY_RECLOC = 2; |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @var Retrieve\Settings |
|
| 46 | - */ |
|
| 47 | - public $settings; |
|
| 48 | - /** |
|
| 49 | - * @var Retrieve\RetrievalFacts |
|
| 50 | - */ |
|
| 51 | - public $retrievalFacts; |
|
| 44 | + /** |
|
| 45 | + * @var Retrieve\Settings |
|
| 46 | + */ |
|
| 47 | + public $settings; |
|
| 48 | + /** |
|
| 49 | + * @var Retrieve\RetrievalFacts |
|
| 50 | + */ |
|
| 51 | + public $retrievalFacts; |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Construct PNR_Retrieve message |
|
| 55 | - * |
|
| 56 | - * @param int $retrievalType |
|
| 57 | - * @param string|null $recordLocator (OPTIONAL) |
|
| 58 | - */ |
|
| 59 | - public function __construct($retrievalType = self::RETR_TYPE_BY_RECLOC, $recordLocator = null) |
|
| 60 | - { |
|
| 61 | - $this->retrievalFacts = new Retrieve\RetrievalFacts( |
|
| 62 | - $retrievalType, |
|
| 63 | - $recordLocator |
|
| 64 | - ); |
|
| 65 | - } |
|
| 53 | + /** |
|
| 54 | + * Construct PNR_Retrieve message |
|
| 55 | + * |
|
| 56 | + * @param int $retrievalType |
|
| 57 | + * @param string|null $recordLocator (OPTIONAL) |
|
| 58 | + */ |
|
| 59 | + public function __construct($retrievalType = self::RETR_TYPE_BY_RECLOC, $recordLocator = null) |
|
| 60 | + { |
|
| 61 | + $this->retrievalFacts = new Retrieve\RetrievalFacts( |
|
| 62 | + $retrievalType, |
|
| 63 | + $recordLocator |
|
| 64 | + ); |
|
| 65 | + } |
|
| 66 | 66 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | throw new \RuntimeException('NOT YET IMPLEMENTED'); |
| 223 | 223 | break; |
| 224 | 224 | default: |
| 225 | - throw new InvalidArgumentException('Segment type ' . $segmentType . ' is not supported'); |
|
| 225 | + throw new InvalidArgumentException('Segment type '.$segmentType.' is not supported'); |
|
| 226 | 226 | break; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | $createdElement->frequentTravellerData = new FrequentTravellerData($element); |
| 428 | 428 | break; |
| 429 | 429 | default: |
| 430 | - throw new InvalidArgumentException('Element type ' . $elementType . 'is not supported'); |
|
| 430 | + throw new InvalidArgumentException('Element type '.$elementType.'is not supported'); |
|
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | if (!empty($element->references)) { |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | |
| 122 | 122 | $po->optionDetail = new OptionDetail(); |
| 123 | 123 | $po->optionDetail->criteriaDetails[] = new CriteriaDetails( |
| 124 | - $pricingFareBasis->fareBasisPrimaryCode . $pricingFareBasis->fareBasisCode |
|
| 124 | + $pricingFareBasis->fareBasisPrimaryCode.$pricingFareBasis->fareBasisCode |
|
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | 127 | $po->paxSegTstReference = new PaxSegTstReference($pricingFareBasis->segmentReference); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | const PRICETYPE_TICKETABILITY_PRECHECK = 'TAC'; |
| 34 | 34 | const PRICETYPE_UNIFARES = 'RU'; |
| 35 | 35 | const PRICETYPE_PUBLICFARES = 'RP'; |
| 36 | - const PRICETYPE_CORPORATE_UNIFARES = 'RW'; |
|
| 36 | + const PRICETYPE_CORPORATE_UNIFARES = 'RW'; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * self::PRICETYPE_* |
@@ -31,28 +31,28 @@ |
||
| 31 | 31 | class SelectionDetailsGroup |
| 32 | 32 | { |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @var SelectionDetailsInfo |
|
| 36 | - */ |
|
| 37 | - public $selectionDetailsInfo; |
|
| 34 | + /** |
|
| 35 | + * @var SelectionDetailsInfo |
|
| 36 | + */ |
|
| 37 | + public $selectionDetailsInfo; |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @var NbOfUnitsInfo |
|
| 41 | - */ |
|
| 42 | - public $nbOfUnitsInfo; |
|
| 39 | + /** |
|
| 40 | + * @var NbOfUnitsInfo |
|
| 41 | + */ |
|
| 42 | + public $nbOfUnitsInfo; |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @var DateAndTimeInfo |
|
| 46 | - */ |
|
| 47 | - public $dateAndTimeInfo; |
|
| 44 | + /** |
|
| 45 | + * @var DateAndTimeInfo |
|
| 46 | + */ |
|
| 47 | + public $dateAndTimeInfo; |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @var QuantityInfo |
|
| 51 | - */ |
|
| 52 | - public $quantityInfo; |
|
| 49 | + /** |
|
| 50 | + * @var QuantityInfo |
|
| 51 | + */ |
|
| 52 | + public $quantityInfo; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @var array |
|
| 56 | - */ |
|
| 57 | - public $attributeInfo = []; |
|
| 54 | + /** |
|
| 55 | + * @var array |
|
| 56 | + */ |
|
| 57 | + public $attributeInfo = []; |
|
| 58 | 58 | } |
@@ -103,12 +103,10 @@ |
||
| 103 | 103 | |
| 104 | 104 | if (!is_null($params->restrictCountry) || !is_null($params->restrictState)) { |
| 105 | 105 | $params->restrictState = (!is_null($params->restrictState)) ? |
| 106 | - strtoupper($params->restrictState) : |
|
| 107 | - $params->restrictState; |
|
| 106 | + strtoupper($params->restrictState) : $params->restrictState; |
|
| 108 | 107 | |
| 109 | 108 | $params->restrictCountry = (!is_null($params->restrictCountry)) ? |
| 110 | - strtoupper($params->restrictCountry) : |
|
| 111 | - $params->restrictCountry; |
|
| 109 | + strtoupper($params->restrictCountry) : $params->restrictCountry; |
|
| 112 | 110 | |
| 113 | 111 | $this->countryStateRestriction = new CountryStateRestriction( |
| 114 | 112 | $params->restrictCountry, |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $this->checkMessageIsInWsdl($messageName); |
| 97 | 97 | |
| 98 | - $methodName = 'create' . str_replace("_", "", $messageName); |
|
| 98 | + $methodName = 'create'.str_replace("_", "", $messageName); |
|
| 99 | 99 | |
| 100 | 100 | if (method_exists($this, $methodName)) { |
| 101 | 101 | return $this->$methodName($params); |
| 102 | 102 | } else { |
| 103 | - throw new \RuntimeException('Message ' . $methodName . ' is not implemented in ' . __CLASS__); |
|
| 103 | + throw new \RuntimeException('Message '.$methodName.' is not implemented in '.__CLASS__); |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | protected function checkMessageIsInWsdl($messageName) |
| 428 | 428 | { |
| 429 | 429 | if (!array_key_exists($messageName, $this->messagesAndVersions)) { |
| 430 | - throw new InvalidMessageException('Message "' . $messageName . '" is not in WDSL'); |
|
| 430 | + throw new InvalidMessageException('Message "'.$messageName.'" is not in WDSL'); |
|
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | |
@@ -59,6 +59,6 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | protected static function makeReceivedFrom($original, $libIdentifier) |
| 61 | 61 | { |
| 62 | - return $original . " " . $libIdentifier; |
|
| 62 | + return $original." ".$libIdentifier; |
|
| 63 | 63 | } |
| 64 | 64 | } |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function __doRequest($request, $location, $action, $version, $oneWay = null) |
| 75 | 75 | { |
| 76 | - if (!extension_loaded ('xsl')) { |
|
| 76 | + if (!extension_loaded('xsl')) { |
|
| 77 | 77 | throw new Exception('PHP XSL extension is not enabled.'); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $newRequest = $this->transformIncomingRequest( $request); |
|
| 80 | + $newRequest = $this->transformIncomingRequest($request); |
|
| 81 | 81 | |
| 82 | 82 | return parent::__doRequest($newRequest, $location, $action, $version, $oneWay); |
| 83 | 83 | } |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $newRequest = null; |
| 93 | 93 | |
| 94 | - $xsltFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . self::REMOVE_EMPTY_XSLT_LOCATION; |
|
| 94 | + $xsltFile = dirname(__FILE__).DIRECTORY_SEPARATOR.self::REMOVE_EMPTY_XSLT_LOCATION; |
|
| 95 | 95 | if (!is_readable($xsltFile)) { |
| 96 | - throw new Exception('XSLT file "' . $xsltFile . '" is not readable!'); |
|
| 96 | + throw new Exception('XSLT file "'.$xsltFile.'" is not readable!'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $dom = new \DOMDocument('1.0', 'UTF-8'); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | if ($transform === false) { |
| 109 | 109 | $this->logger->log( |
| 110 | 110 | Log\LogLevel::ERROR, |
| 111 | - __METHOD__ . "__doRequest(): XSLTProcessor::transformToXml " |
|
| 111 | + __METHOD__."__doRequest(): XSLTProcessor::transformToXml " |
|
| 112 | 112 | . "returned FALSE: could not perform transformation!!" |
| 113 | 113 | ); |
| 114 | 114 | $newRequest = $request; |