1 | <?php |
||
8 | class Parameter |
||
9 | { |
||
10 | const FILE = 'file'; |
||
|
|||
11 | const FROM = 'from'; |
||
12 | const TO = 'to'; |
||
13 | const DEPARTURE_DATE = 'departure'; |
||
14 | const RETURN_DATE = 'arrival'; |
||
15 | const SEARCH_PERIOD_FROM = 'search-period-from'; |
||
16 | const SEARCH_PERIOD_TO = 'search-period-to'; |
||
17 | const SEARCH_PERIOD_TRAVEL_DAYS = 'search-period-travel-days'; |
||
18 | const MAX_PRICE = 'max-price'; |
||
19 | const API_KEY = 'api-key'; |
||
20 | const LOCATION_SCHEMA = 'location-schema'; |
||
21 | const DEFAULT_LOCATION_SCHEMA = 'Sky'; |
||
22 | const COUNTRY = 'country'; |
||
23 | const CURRENCY = 'currency'; |
||
24 | const LOCALE = 'locale'; |
||
25 | const ADULTS = 'adults'; |
||
26 | const DEFAULT_ADULTS = 1; |
||
27 | const CHILDREN = 'children'; |
||
28 | const DEFAULT_CHILDREN = 0; |
||
29 | const INFANTS = 'infants'; |
||
30 | const DEFAULT_INFANTS = 0; |
||
31 | const CABIN_CLASS = 'cabin-class'; |
||
32 | const DEFAULT_CABIN_CLASS = 'Economy'; |
||
33 | const GROUP_PRICING = 'price-per-adult'; |
||
34 | const DEFAULT_GROUP_PRICING = false; |
||
35 | } |
||
36 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.