Type   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 296
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 1 Features 1
Metric Value
wmc 3
c 4
b 1
f 1
lcom 0
cbo 0
dl 0
loc 296
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getType() 0 4 1
A getAvailableTypes() 0 4 1
1
<?php
2
3
namespace Arthem\GoogleApi\Domain\Place\VO;
4
5
use Arthem\GoogleApi\Domain\Place\Exception\UnsupportedTypeException;
6
7
class Type
8
{
9
    const ACCOUNTING = 'accounting';
10
    const AIRPORT = 'airport';
11
    const AMUSEMENT_PARK = 'amusement_park';
12
    const AQUARIUM = 'aquarium';
13
    const ART_GALLERY = 'art_gallery';
14
    const ATM = 'atm';
15
    const BAKERY = 'bakery';
16
    const BANK = 'bank';
17
    const BAR = 'bar';
18
    const BEAUTY_SALON = 'beauty_salon';
19
    const BICYCLE_STORE = 'bicycle_store';
20
    const BOOK_STORE = 'book_store';
21
    const BOWLING_ALLEY = 'bowling_alley';
22
    const BUS_STATION = 'bus_station';
23
    const CAFE = 'cafe';
24
    const CAMPGROUND = 'campground';
25
    const CAR_DEALER = 'car_dealer';
26
    const CAR_RENTAL = 'car_rental';
27
    const CAR_REPAIR = 'car_repair';
28
    const CAR_WASH = 'car_wash';
29
    const CASINO = 'casino';
30
    const CEMETERY = 'cemetery';
31
    const CHURCH = 'church';
32
    const CITY_HALL = 'city_hall';
33
    const CLOTHING_STORE = 'clothing_store';
34
    const CONVENIENCE_STORE = 'convenience_store';
35
    const COURTHOUSE = 'courthouse';
36
    const DENTIST = 'dentist';
37
    const DEPARTMENT_STORE = 'department_store';
38
    const DOCTOR = 'doctor';
39
    const ELECTRICIAN = 'electrician';
40
    const ELECTRONICS_STORE = 'electronics_store';
41
    const EMBASSY = 'embassy';
42
    const ESTABLISHMENT = 'establishment';
43
    const FINANCE = 'finance';
44
    const FIRE_STATION = 'fire_station';
45
    const FLORIST = 'florist';
46
    const FOOD = 'food';
47
    const FUNERAL_HOME = 'funeral_home';
48
    const FURNITURE_STORE = 'furniture_store';
49
    const GAS_STATION = 'gas_station';
50
    const GENERAL_CONTRACTOR = 'general_contractor';
51
    const GROCERY_OR_SUPERMARKET = 'grocery_or_supermarket';
52
    const GYM = 'gym';
53
    const HAIR_CARE = 'hair_care';
54
    const HARDWARE_STORE = 'hardware_store';
55
    const HEALTH = 'health';
56
    const HINDU_TEMPLE = 'hindu_temple';
57
    const HOME_GOODS_STORE = 'home_goods_store';
58
    const HOSPITAL = 'hospital';
59
    const INSURANCE_AGENCY = 'insurance_agency';
60
    const JEWELRY_STORE = 'jewelry_store';
61
    const LAUNDRY = 'laundry';
62
    const LAWYER = 'lawyer';
63
    const LIBRARY = 'library';
64
    const LIQUOR_STORE = 'liquor_store';
65
    const LOCAL_GOVERNMENT_OFFICE = 'local_government_office';
66
    const LOCKSMITH = 'locksmith';
67
    const LODGING = 'lodging';
68
    const MEAL_DELIVERY = 'meal_delivery';
69
    const MEAL_TAKEAWAY = 'meal_takeaway';
70
    const MOSQUE = 'mosque';
71
    const MOVIE_RENTAL = 'movie_rental';
72
    const MOVIE_THEATER = 'movie_theater';
73
    const MOVING_COMPANY = 'moving_company';
74
    const MUSEUM = 'museum';
75
    const NIGHT_CLUB = 'night_club';
76
    const PAINTER = 'painter';
77
    const PARK = 'park';
78
    const PARKING = 'parking';
79
    const PET_STORE = 'pet_store';
80
    const PHARMACY = 'pharmacy';
81
    const PHYSIOTHERAPIST = 'physiotherapist';
82
    const PLACE_OF_WORSHIP = 'place_of_worship';
83
    const PLUMBER = 'plumber';
84
    const POLICE = 'police';
85
    const POST_OFFICE = 'post_office';
86
    const REAL_ESTATE_AGENCY = 'real_estate_agency';
87
    const RESTAURANT = 'restaurant';
88
    const ROOFING_CONTRACTOR = 'roofing_contractor';
89
    const RV_PARK = 'rv_park';
90
    const SCHOOL = 'school';
91
    const SHOE_STORE = 'shoe_store';
92
    const SHOPPING_MALL = 'shopping_mall';
93
    const SPA = 'spa';
94
    const STADIUM = 'stadium';
95
    const STORAGE = 'storage';
96
    const STORE = 'store';
97
    const SUBWAY_STATION = 'subway_station';
98
    const SYNAGOGUE = 'synagogue';
99
    const TAXI_STAND = 'taxi_stand';
100
    const TRAIN_STATION = 'train_station';
101
    const TRAVEL_AGENCY = 'travel_agency';
102
    const UNIVERSITY = 'university';
103
    const VETERINARY_CARE = 'veterinary_care';
104
    const ZOO = 'zoo';
105
106
    // Others
107
    const ADMINISTRATIVE_AREA_LEVEL_1 = 'administrative_area_level_1';
108
    const ADMINISTRATIVE_AREA_LEVEL_2 = 'administrative_area_level_2';
109
    const ADMINISTRATIVE_AREA_LEVEL_3 = 'administrative_area_level_3';
110
    const ADMINISTRATIVE_AREA_LEVEL_4 = 'administrative_area_level_4';
111
    const ADMINISTRATIVE_AREA_LEVEL_5 = 'administrative_area_level_5';
112
    const COLLOQUIAL_AREA = 'colloquial_area';
113
    const COUNTRY = 'country';
114
    const FLOOR = 'floor';
115
    const GEOCODE = 'geocode';
116
    const INTERSECTION = 'intersection';
117
    const LOCALITY = 'locality';
118
    const NATURAL_FEATURE = 'natural_feature';
119
    const NEIGHBORHOOD = 'neighborhood';
120
    const POLITICAL = 'political';
121
    const POINT_OF_INTEREST = 'point_of_interest';
122
    const POST_BOX = 'post_box';
123
    const POSTAL_CODE = 'postal_code';
124
    const POSTAL_CODE_PREFIX = 'postal_code_prefix';
125
    const POSTAL_CODE_SUFFIX = 'postal_code_suffix';
126
    const POSTAL_TOWN = 'postal_town';
127
    const PREMISE = 'premise';
128
    const ROOM = 'room';
129
    const ROUTE = 'route';
130
    const STREET_ADDRESS = 'street_address';
131
    const STREET_NUMBER = 'street_number';
132
    const SUBLOCALITY = 'sublocality';
133
    const SUBLOCALITY_LEVEL_4 = 'sublocality_level_4';
134
    const SUBLOCALITY_LEVEL_5 = 'sublocality_level_5';
135
    const SUBLOCALITY_LEVEL_3 = 'sublocality_level_3';
136
    const SUBLOCALITY_LEVEL_2 = 'sublocality_level_2';
137
    const SUBLOCALITY_LEVEL_1 = 'sublocality_level_1';
138
    const SUBPREMISE = 'subpremise';
139
    const TRANSIT_STATION = 'transit_station';
140
141
    private static $availableTypes = [
142
        self::ACCOUNTING,
143
        self::AIRPORT,
144
        self::AMUSEMENT_PARK,
145
        self::AQUARIUM,
146
        self::ART_GALLERY,
147
        self::ATM,
148
        self::BAKERY,
149
        self::BANK,
150
        self::BAR,
151
        self::BEAUTY_SALON,
152
        self::BICYCLE_STORE,
153
        self::BOOK_STORE,
154
        self::BOWLING_ALLEY,
155
        self::BUS_STATION,
156
        self::CAFE,
157
        self::CAMPGROUND,
158
        self::CAR_DEALER,
159
        self::CAR_RENTAL,
160
        self::CAR_REPAIR,
161
        self::CAR_WASH,
162
        self::CASINO,
163
        self::CEMETERY,
164
        self::CHURCH,
165
        self::CITY_HALL,
166
        self::CLOTHING_STORE,
167
        self::CONVENIENCE_STORE,
168
        self::COURTHOUSE,
169
        self::DENTIST,
170
        self::DEPARTMENT_STORE,
171
        self::DOCTOR,
172
        self::ELECTRICIAN,
173
        self::ELECTRONICS_STORE,
174
        self::EMBASSY,
175
        self::ESTABLISHMENT,
176
        self::FINANCE,
177
        self::FIRE_STATION,
178
        self::FLORIST,
179
        self::FOOD,
180
        self::FUNERAL_HOME,
181
        self::FURNITURE_STORE,
182
        self::GAS_STATION,
183
        self::GENERAL_CONTRACTOR,
184
        self::GROCERY_OR_SUPERMARKET,
185
        self::GYM,
186
        self::HAIR_CARE,
187
        self::HARDWARE_STORE,
188
        self::HEALTH,
189
        self::HINDU_TEMPLE,
190
        self::HOME_GOODS_STORE,
191
        self::HOSPITAL,
192
        self::INSURANCE_AGENCY,
193
        self::JEWELRY_STORE,
194
        self::LAUNDRY,
195
        self::LAWYER,
196
        self::LIBRARY,
197
        self::LIQUOR_STORE,
198
        self::LOCAL_GOVERNMENT_OFFICE,
199
        self::LOCKSMITH,
200
        self::LODGING,
201
        self::MEAL_DELIVERY,
202
        self::MEAL_TAKEAWAY,
203
        self::MOSQUE,
204
        self::MOVIE_RENTAL,
205
        self::MOVIE_THEATER,
206
        self::MOVING_COMPANY,
207
        self::MUSEUM,
208
        self::NIGHT_CLUB,
209
        self::PAINTER,
210
        self::PARK,
211
        self::PARKING,
212
        self::PET_STORE,
213
        self::PHARMACY,
214
        self::PHYSIOTHERAPIST,
215
        self::PLACE_OF_WORSHIP,
216
        self::PLUMBER,
217
        self::POLICE,
218
        self::POST_OFFICE,
219
        self::REAL_ESTATE_AGENCY,
220
        self::RESTAURANT,
221
        self::ROOFING_CONTRACTOR,
222
        self::RV_PARK,
223
        self::SCHOOL,
224
        self::SHOE_STORE,
225
        self::SHOPPING_MALL,
226
        self::SPA,
227
        self::STADIUM,
228
        self::STORAGE,
229
        self::STORE,
230
        self::SUBWAY_STATION,
231
        self::SYNAGOGUE,
232
        self::TAXI_STAND,
233
        self::TRAIN_STATION,
234
        self::TRAVEL_AGENCY,
235
        self::UNIVERSITY,
236
        self::VETERINARY_CARE,
237
        self::ZOO,
238
        // Others
239
        self::ADMINISTRATIVE_AREA_LEVEL_1,
240
        self::ADMINISTRATIVE_AREA_LEVEL_2,
241
        self::ADMINISTRATIVE_AREA_LEVEL_3,
242
        self::ADMINISTRATIVE_AREA_LEVEL_4,
243
        self::ADMINISTRATIVE_AREA_LEVEL_5,
244
        self::COLLOQUIAL_AREA,
245
        self::COUNTRY,
246
        self::FLOOR,
247
        self::GEOCODE,
248
        self::INTERSECTION,
249
        self::LOCALITY,
250
        self::NATURAL_FEATURE,
251
        self::NEIGHBORHOOD,
252
        self::POLITICAL,
253
        self::POINT_OF_INTEREST,
254
        self::POST_BOX,
255
        self::POSTAL_CODE,
256
        self::POSTAL_CODE_PREFIX,
257
        self::POSTAL_CODE_SUFFIX,
258
        self::POSTAL_TOWN,
259
        self::PREMISE,
260
        self::ROOM,
261
        self::ROUTE,
262
        self::STREET_ADDRESS,
263
        self::STREET_NUMBER,
264
        self::SUBLOCALITY,
265
        self::SUBLOCALITY_LEVEL_4,
266
        self::SUBLOCALITY_LEVEL_5,
267
        self::SUBLOCALITY_LEVEL_3,
268
        self::SUBLOCALITY_LEVEL_2,
269
        self::SUBLOCALITY_LEVEL_1,
270
        self::SUBPREMISE,
271
        self::TRANSIT_STATION,
272
    ];
273
274
    /**
275
     * @var string
276
     */
277
    private $type;
278
279
    /**
280
     * @param string $type
281
     */
282
    public function __construct($type)
283
    {
284
        $this->type = $type;
285
    }
286
287
    /**
288
     * @return string
289
     */
290
    public function getType()
291
    {
292
        return $this->type;
293
    }
294
295
    /**
296
     * @return array
297
     */
298
    public static function getAvailableTypes()
299
    {
300
        return self::$availableTypes;
301
    }
302
}
303