1 | <?php |
||
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) |
||
108 | } |
||
109 |
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.