Completed
Push — develop ( a76585...594582 )
by Dieter
05:37
created

PredicateSelectionDetails::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
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\Pnr\DisplayHistory;
24
25
/**
26
 * PredicateSelectionDetails
27
 *
28
 * @package Amadeus\Client\Struct\Pnr\DisplayHistory
29
 * @author Dieter Devlieghere <[email protected]>
30
 */
31
class PredicateSelectionDetails
32
{
33
    /**
34
     * Display ETR elements only
35
     */
36
    const OPT_DISPLAY_ETR_ONLY = "ETR";
37
    /**
38
     * Display element numbering sent in Feeds
39
     */
40
    const OPT_DISPLAY_EL_NUMBERING_FEEDS = "FED";
41
    /**
42
     * Find history lines containing a certain freetext
43
     */
44
    const OPT_FIND_HISTORY_LINES_FREETEXT = "FND";
45
    /**
46
     * Display full display of history lines
47
     */
48
    const OPT_FULL_DISPLAY = "FUL";
49
    /**
50
     * Filter predicate
51
     */
52
    const OPT_FILTER_PREDICATE = "FIL";
53
    /**
54
     * Display envelopes containing RF line only
55
     */
56
    const OPT_DISP_ENVELOPES_CONTAINING_RF = "KRF";
57
    /**
58
     * Display PNR elements only
59
     */
60
    const OPT_DISP_PNR_ELEMENTS = "PNR";
61
    /**
62
     * Match queue update
63
     */
64
    const OPT_MATCH_QUEUE_UPDATE = "QUE";
65
    /**
66
     * Selection predicate
67
     */
68
    const OPT_SELECTION_PREDICATE = "SEL";
69
    /**
70
     * Display all TTR elements
71
     */
72
    const OPT_DISPLAY_ALL_TTR = "TTR";
73
74
    /**
75
     * Predicate Type Option Information
76
     */
77
    const OPTINF_PREDICATE_TYPE = 0;
78
    /**
79
     * Match Queue Updates Option Information
80
     */
81
    const OPTINF_MATCH_QUEUE_UPDATES = 1;
82
83
    /**
84
     * self::OPT_*
85
     *
86
     * @var string
87
     */
88
    public $option;
89
90
    /**
91
     * self::OPTINF_*
92
     *
93
     * @var string
94
     */
95
    public $optionInformation;
96
97
    /**
98
     * PredicateSelectionDetails constructor.
99
     *
100
     * @param string $option self::OPT_*
101
     * @param int $optionInformation self::OPTINF_*
102
     */
103
    public function __construct($option, $optionInformation = self::OPTINF_PREDICATE_TYPE)
104
    {
105
        $this->option = $option;
106
        $this->optionInformation = $optionInformation;
0 ignored issues
show
Documentation Bug introduced by
The property $optionInformation was declared of type string, but $optionInformation is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
107
    }
108
}
109