|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* amadeus-ws-client |
|
4
|
|
|
* |
|
5
|
|
|
* Copyright 2015 Amadeus Benelux NV |
|
6
|
|
|
* |
|
7
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
8
|
|
|
* you may not use this file except in compliance with the License. |
|
9
|
|
|
* You may obtain a copy of the License at |
|
10
|
|
|
* |
|
11
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
|
12
|
|
|
* |
|
13
|
|
|
* Unless required by applicable law or agreed to in writing, software |
|
14
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
15
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
16
|
|
|
* See the License for the specific language governing permissions and |
|
17
|
|
|
* limitations under the License. |
|
18
|
|
|
* |
|
19
|
|
|
* @package Amadeus |
|
20
|
|
|
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0 |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
namespace Amadeus\Client\Struct\DocIssuance; |
|
24
|
|
|
|
|
25
|
|
|
use Amadeus\Client\RequestOptions\DocIssuance\CompoundOption; |
|
26
|
|
|
use Amadeus\Client\Struct\BaseWsMessage; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* DocIssuanceBaseMsg |
|
30
|
|
|
* |
|
31
|
|
|
* Basic Request structure for the DocIssuance messages |
|
32
|
|
|
* |
|
33
|
|
|
* @package Amadeus\Client\Struct\DocIssuance |
|
34
|
|
|
* @author Dieter Devlieghere <[email protected]> |
|
35
|
|
|
*/ |
|
36
|
|
|
class DocIssuanceBaseMsg extends BaseWsMessage |
|
37
|
|
|
{ |
|
38
|
|
|
/** |
|
39
|
|
|
* @var Selection[] |
|
40
|
|
|
*/ |
|
41
|
|
|
public $selection = []; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @var PaxSelection[] |
|
45
|
|
|
*/ |
|
46
|
|
|
public $paxSelection = []; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var Stock |
|
50
|
|
|
*/ |
|
51
|
|
|
public $stock; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @var OptionGroup[] |
|
55
|
|
|
*/ |
|
56
|
|
|
public $optionGroup = []; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @var InfantOrAdultAssociation |
|
60
|
|
|
*/ |
|
61
|
|
|
public $infantOrAdultAssociation; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @var OtherCompoundOptions[] |
|
65
|
|
|
*/ |
|
66
|
|
|
public $otherCompoundOptions = []; |
|
67
|
|
|
|
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @param string[] $options, |
|
|
|
|
|
|
71
|
|
|
* @param CompoundOption[] $compoundOptions |
|
72
|
|
|
*/ |
|
73
|
18 |
|
protected function loadOptions($options, $compoundOptions) |
|
74
|
|
|
{ |
|
75
|
18 |
|
foreach ($options as $option) { |
|
76
|
5 |
|
$this->optionGroup[] = new OptionGroup($option); |
|
77
|
18 |
|
} |
|
78
|
|
|
|
|
79
|
18 |
|
foreach ($compoundOptions as $compoundOption) { |
|
80
|
3 |
|
$this->otherCompoundOptions[] = new OtherCompoundOptions( |
|
81
|
3 |
|
$compoundOption->type, |
|
82
|
3 |
|
$compoundOption->details |
|
83
|
3 |
|
); |
|
84
|
18 |
|
} |
|
85
|
18 |
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @param ReferenceDetails $ref |
|
89
|
|
|
*/ |
|
90
|
4 |
|
protected function addSelectionItem(ReferenceDetails $ref) |
|
91
|
|
|
{ |
|
92
|
4 |
|
if (is_null($this->selection) || empty($this->selection)) { |
|
93
|
4 |
|
$this->selection[] = new Selection(); |
|
94
|
4 |
|
} |
|
95
|
|
|
|
|
96
|
4 |
|
$this->selection[0]->referenceDetails[] = $ref; |
|
97
|
4 |
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @param string|null $passType |
|
101
|
|
|
*/ |
|
102
|
18 |
|
protected function loadPassType($passType) |
|
103
|
|
|
{ |
|
104
|
18 |
|
if (!empty($passType)) { |
|
105
|
2 |
|
$this->infantOrAdultAssociation = new InfantOrAdultAssociation($passType); |
|
106
|
2 |
|
} |
|
107
|
18 |
|
} |
|
108
|
|
|
} |
|
109
|
|
|
|
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.