GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( 311795...859c79 )
by Igor
06:22 queued 13s
created
src/Route4Me/V5/Vehicles/DataTypes/VehicleReduced.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -9,73 +9,73 @@
 block discarded – undo
9 9
  */
10 10
 class VehicleReduced extends \Route4Me\Common
11 11
 {
12
-    /** The vehicle ID
13
-     * @var string $vehicle_id
14
-     */
15
-    public $vehicle_id;
12
+	/** The vehicle ID
13
+	 * @var string $vehicle_id
14
+	 */
15
+	public $vehicle_id;
16 16
 
17
-    /** Vehicle alias
18
-     * @var string $vehicle_alias
19
-     */
20
-    public $vehicle_alias;
17
+	/** Vehicle alias
18
+	 * @var string $vehicle_alias
19
+	 */
20
+	public $vehicle_alias;
21 21
 
22
-    /** Vehicle VIN
23
-     * @var string $vehicle_vin
24
-     */
25
-    public $vehicle_vin;
22
+	/** Vehicle VIN
23
+	 * @var string $vehicle_vin
24
+	 */
25
+	public $vehicle_vin;
26 26
 
27
-    /** A license plate of the vehicle.
28
-     * @var string $vehicle_license_plate
29
-     */
30
-    public $vehicle_license_plate;
27
+	/** A license plate of the vehicle.
28
+	 * @var string $vehicle_license_plate
29
+	 */
30
+	public $vehicle_license_plate;
31 31
 
32
-    /** Vehicle maker brend.
33
-     * <para>Available values:</para>
34
-     * "american coleman", "bmw", "chevrolet", "ford", "freightliner", "gmc",
35
-     * <para>"hino", "honda", "isuzu", "kenworth", "mack", "mercedes-benz", "mitsubishi", </para>
36
-     * "navistar", "nissan", "peterbilt", "renault", "scania", "sterling", "toyota",
37
-     * <para>"volvo", "western star" </para>
38
-     * @var string $vehicle_make
39
-     */
40
-    public $vehicle_make;
32
+	/** Vehicle maker brend.
33
+	 * <para>Available values:</para>
34
+	 * "american coleman", "bmw", "chevrolet", "ford", "freightliner", "gmc",
35
+	 * <para>"hino", "honda", "isuzu", "kenworth", "mack", "mercedes-benz", "mitsubishi", </para>
36
+	 * "navistar", "nissan", "peterbilt", "renault", "scania", "sterling", "toyota",
37
+	 * <para>"volvo", "western star" </para>
38
+	 * @var string $vehicle_make
39
+	 */
40
+	public $vehicle_make;
41 41
 
42
-    /** Vehicle model year
43
-     * @var integer $vehicle_model_year
44
-     */
45
-    public $vehicle_model_year;
42
+	/** Vehicle model year
43
+	 * @var integer $vehicle_model_year
44
+	 */
45
+	public $vehicle_model_year;
46 46
 
47
-    /** Vehicle model
48
-     * @var string $vehicle_model
49
-     */
50
-    public $vehicle_model;
47
+	/** Vehicle model
48
+	 * @var string $vehicle_model
49
+	 */
50
+	public $vehicle_model;
51 51
 
52
-    /** The year, vehicle was acquired
53
-     * @var integer $vehicle_year_acquired
54
-     */
55
-    public $vehicle_year_acquired;
52
+	/** The year, vehicle was acquired
53
+	 * @var integer $vehicle_year_acquired
54
+	 */
55
+	public $vehicle_year_acquired;
56 56
 
57
-    /** A cost of the new vehicle
58
-     * @var float $vehicle_cost_new
59
-     */
60
-    public $vehicle_cost_new;
57
+	/** A cost of the new vehicle
58
+	 * @var float $vehicle_cost_new
59
+	 */
60
+	public $vehicle_cost_new;
61 61
 
62
-    /** If true, the vehicle was purchased new.
63
-     * @var boolean $purchased_new
64
-     */
65
-    public $purchased_new;
62
+	/** If true, the vehicle was purchased new.
63
+	 * @var boolean $purchased_new
64
+	 */
65
+	public $purchased_new;
66 66
 
67
-    /** Start date of the license
68
-     * @var string $license_start_date
69
-     */
70
-    public $license_start_date;
67
+	/** Start date of the license
68
+	 * @var string $license_start_date
69
+	 */
70
+	public $license_start_date;
71 71
 
72
-    /** End date of the license
73
-     * @var string $license_end_date
74
-     */
75
-    public $license_end_date;
72
+	/** End date of the license
73
+	 * @var string $license_end_date
74
+	 */
75
+	public $license_end_date;
76 76
 
77
-    /** If equal to '1', the vehicle is operational.
78
-     * @var boolean $is_operational
79
-     */
80
-    public $is_operational;
77
+	/** If equal to '1', the vehicle is operational.
78
+	 * @var boolean $is_operational
79
+	 */
80
+	public $is_operational;
81 81
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleLocationItem.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,23 +9,23 @@
 block discarded – undo
9 9
  */
10 10
 class VehicleLocationItem extends \Route4Me\Common
11 11
 {
12
-    /** The vehicle ID
13
-     * @var string $vehicle_id
14
-     */
15
-    public $vehicle_id;
12
+	/** The vehicle ID
13
+	 * @var string $vehicle_id
14
+	 */
15
+	public $vehicle_id;
16 16
 
17
-    /** When a vehicle activity was detected.
18
-     * @var integer $activity_timestamp
19
-     */
20
-    public $activity_timestamp;
17
+	/** When a vehicle activity was detected.
18
+	 * @var integer $activity_timestamp
19
+	 */
20
+	public $activity_timestamp;
21 21
 
22
-    /** Latitude of a vehicle position.
23
-     * @var float $lat
24
-     */
25
-    public $lat;
22
+	/** Latitude of a vehicle position.
23
+	 * @var float $lat
24
+	 */
25
+	public $lat;
26 26
 
27
-    /** Longitude of a vehicle position
28
-     * @var float $lng
29
-     */
30
-    public $lng;
27
+	/** Longitude of a vehicle position
28
+	 * @var float $lng
29
+	 */
30
+	public $lng;
31 31
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleResponse.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleResponse extends Common
13 13
 {
14
-    /** Vehicle data
15
-     * @var DataVehicle $data
16
-     */
17
-    public $data = [];
14
+	/** Vehicle data
15
+	 * @var DataVehicle $data
16
+	 */
17
+	public $data = [];
18 18
 
19
-    public static function fromArray(array $params)
20
-    {
21
-        $vehResp = new self();
19
+	public static function fromArray(array $params)
20
+	{
21
+		$vehResp = new self();
22 22
 
23
-        foreach ($params as $key => $value) {
24
-            if (is_null(Common::getValue($params, $key))) {
25
-                continue;
26
-            }
27
-            if (property_exists($vehResp, $key)) {
28
-                $vehResp->$key = $value;
29
-            }
30
-        }
31
-        return $vehResp;
32
-    }
23
+		foreach ($params as $key => $value) {
24
+			if (is_null(Common::getValue($params, $key))) {
25
+				continue;
26
+			}
27
+			if (property_exists($vehResp, $key)) {
28
+				$vehResp->$key = $value;
29
+			}
30
+		}
31
+		return $vehResp;
32
+	}
33 33
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleProfilesResponse.php 1 patch
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -11,78 +11,78 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleProfilesResponse extends Common
13 13
 {
14
-    /** Current page of the paginated vehicle profiles list.
15
-     * @var integer $current_page
16
-     */
17
-    public $current_page;
18
-
19
-    /** An array of the vehicle profiles
20
-     * @var VehileProfile[] $data
21
-     */
22
-    public $data = [];
23
-
24
-    /** URL to the first page of the paginated vehicle profiles list.
25
-     * @var string $first_page_url
26
-     */
27
-    public $first_page_url;
28
-
29
-    /** From which vehicle profile is starting the page
30
-     * @var integer $from
31
-     */
32
-    public $from;
33
-
34
-    /** Last page
35
-     * @var integer $last_page
36
-     */
37
-    public $last_page;
38
-
39
-    /** URL to the last page of the paginated vehicle profiles list.
40
-     * @var string $last_page_url
41
-     */
42
-    public $last_page_url;
43
-
44
-    /** URL to the next page of the paginated vehicle profiles list.
45
-     * @var string $next_page_url
46
-     */
47
-    public $next_page_url;
48
-
49
-    /** Path to the API endpoint
50
-     * @var string $path
51
-     */
52
-    public $path;
53
-
54
-    /** Vehicles number per page
55
-     * @var integer $per_page
56
-     */
57
-    public $per_page;
58
-
59
-    /** URL to the previous page
60
-     * @var string $prev_page_url
61
-     */
62
-    public $prev_page_url;
63
-
64
-    /** To which vehicle profile is ending the page
65
-     * @var integer $to
66
-     */
67
-    public $to;
68
-
69
-    /** Total number of the vehicles.
70
-     * @var integer $total
71
-     */
72
-    public $total;
73
-
74
-    public static function fromArray(array $params)
75
-    {
76
-        $profResp = new self();
77
-
78
-        foreach ($params as $key => $value) {
79
-            if (is_null(Common::getValue($params, $key))) {
80
-                continue;
81
-            }
82
-            if (property_exists($profResp, $key)) {
83
-                $profResp->$key = $value;
84
-            }
85
-        }
86
-        return $profResp;
87
-    }
14
+	/** Current page of the paginated vehicle profiles list.
15
+	 * @var integer $current_page
16
+	 */
17
+	public $current_page;
18
+
19
+	/** An array of the vehicle profiles
20
+	 * @var VehileProfile[] $data
21
+	 */
22
+	public $data = [];
23
+
24
+	/** URL to the first page of the paginated vehicle profiles list.
25
+	 * @var string $first_page_url
26
+	 */
27
+	public $first_page_url;
28
+
29
+	/** From which vehicle profile is starting the page
30
+	 * @var integer $from
31
+	 */
32
+	public $from;
33
+
34
+	/** Last page
35
+	 * @var integer $last_page
36
+	 */
37
+	public $last_page;
38
+
39
+	/** URL to the last page of the paginated vehicle profiles list.
40
+	 * @var string $last_page_url
41
+	 */
42
+	public $last_page_url;
43
+
44
+	/** URL to the next page of the paginated vehicle profiles list.
45
+	 * @var string $next_page_url
46
+	 */
47
+	public $next_page_url;
48
+
49
+	/** Path to the API endpoint
50
+	 * @var string $path
51
+	 */
52
+	public $path;
53
+
54
+	/** Vehicles number per page
55
+	 * @var integer $per_page
56
+	 */
57
+	public $per_page;
58
+
59
+	/** URL to the previous page
60
+	 * @var string $prev_page_url
61
+	 */
62
+	public $prev_page_url;
63
+
64
+	/** To which vehicle profile is ending the page
65
+	 * @var integer $to
66
+	 */
67
+	public $to;
68
+
69
+	/** Total number of the vehicles.
70
+	 * @var integer $total
71
+	 */
72
+	public $total;
73
+
74
+	public static function fromArray(array $params)
75
+	{
76
+		$profResp = new self();
77
+
78
+		foreach ($params as $key => $value) {
79
+			if (is_null(Common::getValue($params, $key))) {
80
+				continue;
81
+			}
82
+			if (property_exists($profResp, $key)) {
83
+				$profResp->$key = $value;
84
+			}
85
+		}
86
+		return $profResp;
87
+	}
88 88
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleTrackItem.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -4,38 +4,38 @@
 block discarded – undo
4 4
 
5 5
 class VehicleTrackItem extends \Route4Me\Common
6 6
 {
7
-    /** The vehicle ID
8
-     * @var string $vehicle_id
9
-     */
10
-    public $vehicle_id;
11
-
12
-    /** The member ID
13
-     * @var integer $member_id
14
-     */
15
-    public $member_id;
16
-
17
-    /** Latitude of a vehicle position.
18
-     * @var float $lat
19
-     */
20
-    public $lat;
21
-
22
-    /** Longitude of a vehicle position.
23
-     * @var float $lng
24
-     */
25
-    public $lng;
26
-
27
-    /** The geographic altitude
28
-     * @var integer $altitude
29
-     */
30
-    public $altitude;
31
-
32
-    /** Vehicle speed
33
-     * @var integer $speed
34
-     */
35
-    public $speed;
36
-
37
-    /** When a vehicle activity was detected.
38
-     * @var integer $timestamp
39
-     */
40
-    public $timestamp;
7
+	/** The vehicle ID
8
+	 * @var string $vehicle_id
9
+	 */
10
+	public $vehicle_id;
11
+
12
+	/** The member ID
13
+	 * @var integer $member_id
14
+	 */
15
+	public $member_id;
16
+
17
+	/** Latitude of a vehicle position.
18
+	 * @var float $lat
19
+	 */
20
+	public $lat;
21
+
22
+	/** Longitude of a vehicle position.
23
+	 * @var float $lng
24
+	 */
25
+	public $lng;
26
+
27
+	/** The geographic altitude
28
+	 * @var integer $altitude
29
+	 */
30
+	public $altitude;
31
+
32
+	/** Vehicle speed
33
+	 * @var integer $speed
34
+	 */
35
+	public $speed;
36
+
37
+	/** When a vehicle activity was detected.
38
+	 * @var integer $timestamp
39
+	 */
40
+	public $timestamp;
41 41
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleProfile.php 1 patch
Indentation   +254 added lines, -254 removed lines patch added patch discarded remove patch
@@ -15,258 +15,258 @@
 block discarded – undo
15 15
  */
16 16
 class VehicleProfile extends Common
17 17
 {
18
-    /** Vehicle profile ID
19
-     * @var integer $vehicle_profile_id
20
-     */
21
-    public $vehicle_profile_id;
22
-
23
-    /** Root member ID
24
-     * @var integer $root_member_id
25
-     */
26
-    public $root_member_id;
27
-
28
-    /** Vehicle profile name
29
-     * @var string $name
30
-     */
31
-    public $name;
32
-
33
-    /** Vehicle height
34
-     * @var float $height
35
-     */
36
-    public $height;
37
-
38
-    /** Vehicle width
39
-     * @var float $width
40
-     */
41
-    public $width;
42
-
43
-    /** Vehicle length
44
-     * @var float $length
45
-     */
46
-    public $length;
47
-
48
-    /** Vehicle weight
49
-     * @var float $weight
50
-     */
51
-    public $weight;
52
-
53
-    /** Maximum weight per axle.
54
-     * @var float $max_weight_per_axle
55
-     */
56
-    public $max_weight_per_axle;
57
-
58
-    /** When the profile deleted
59
-     * @var string $deleted_at
60
-     */
61
-    public $deleted_at;
62
-
63
-    /** When the profile created
64
-     * @var string $created_at
65
-     */
66
-    public $created_at;
67
-
68
-    /** When the profile updated
69
-     * @var string $updated_at
70
-     */
71
-    public $updated_at;
72
-
73
-    /** A type of the fuel
74
-     * enum: ['unleaded 87','unleaded 89','unleaded 91',
75
-     * 'unleaded 93','diesel','electric','hybrid']
76
-     * @var string $fuel_type
77
-     */
78
-    public $fuel_type;
79
-
80
-    /** Fuel consumption city
81
-     * @var float $fuel_consumption_city
82
-     */
83
-    public $fuel_consumption_city;
84
-
85
-    /** Fuel consumption in the highway area
86
-     * @var float $fuel_consumption_highway
87
-     */
88
-    public $fuel_consumption_highway;
89
-
90
-    /** Type of a hazardous material.
91
-     * enum: ['general', 'explosives', 'flammable', 'inhalants', 'caustic', 'radioactive']
92
-     * @var string $hazmat_type
93
-     */
94
-    public $hazmat_type;
95
-
96
-    /** If true, the profile is predefined.
97
-     * @var boolean $is_predefined
98
-     */
99
-    public $is_predefined;
100
-
101
-    /** If true, the profile is default.
102
-     * @var boolean $is_default
103
-     */
104
-    public $is_default;
105
-
106
-    /** Height units (e.g. 'ft', 'm')
107
-     * @var string $height_units
108
-     */
109
-    public $height_units;
110
-
111
-    /** Width units (e.g. 'ft', 'm')
112
-     * @var string $width_units
113
-     */
114
-    public $width_units;
115
-
116
-    /** Length units (e.g. 'ft', 'm')
117
-     * @var string $length_units
118
-     */
119
-    public $length_units;
120
-
121
-    /** Weight units (e.g. 'lb', 'kg')
122
-     * @var string $weight_units
123
-     */
124
-    public $weight_units;
125
-
126
-    /** Maximum weight per axle units (e.g. 'lb', 'kg')
127
-     * @var string $max_weight_per_axle_units
128
-     */
129
-    public $max_weight_per_axle_units;
130
-
131
-    /** Fuel consumption units in the city area (e.g. mpg)
132
-     * @var string $fuel_consumption_city_unit
133
-     */
134
-    public $fuel_consumption_city_unit;
135
-
136
-    /** Fuel consumption units in the highway area (e.g. mpg)
137
-     * @var string $fuel_consumption_highway_unit
138
-     */
139
-    public $fuel_consumption_highway_unit;
140
-
141
-    /** Height UF value (e.g. "7'")
142
-     * @var string $height_uf_value
143
-     */
144
-    public $height_uf_value;
145
-
146
-    /** Width UF value (e.g. "8'")
147
-     * @var string $width_uf_value
148
-     */
149
-    public $width_uf_value;
150
-
151
-    /** Length UF value (e.g. "20'")
152
-     * @var string $length_uf_value
153
-     */
154
-    public $length_uf_value;
155
-
156
-    /** Weight UF value (e.g. "8,500lb")
157
-     * @var string $weight_uf_value
158
-     */
159
-    public $weight_uf_value;
160
-
161
-    /** Maximum weight per axle (UF value, e.g. "8,500lb")
162
-     * @var string $max_weight_per_axle_uf_value
163
-     */
164
-    public $max_weight_per_axle_uf_value;
165
-
166
-    /** Fuel consumption city (UF value, e.g. "20.01 mi/l")
167
-     * @var string $fuel_consumption_city_uf_value
168
-     */
169
-    public $fuel_consumption_city_uf_value;
170
-
171
-    /** Fuel consumption highway (UF value, e.g. "2,000.01 mpg")
172
-     * @var string $fuel_consumption_highway_uf_value
173
-     */
174
-    public $fuel_consumption_highway_uf_value;
175
-
176
-    public static function fromArray(array $params)
177
-    {
178
-        $vehicleProfile = new self();
179
-
180
-        foreach ($params as $key => $value) {
181
-            if (is_null(Common::getValue($params, $key))) {
182
-                continue;
183
-            }
184
-            if (property_exists($vehicleProfile, $key)) {
185
-                $vehicleProfile->$key = $value;
186
-            }
187
-        }
188
-
189
-        return $vehicleProfile;
190
-    }
191
-
192
-    public function __construct()
193
-    {
194
-        Route4Me::setBaseUrl("");
195
-    }
196
-
197
-    public function removeVehicleProfile($vehicleProfileId)
198
-    {
199
-        //$vehicleProfileID = isset($params['vehicle_profile_id']) ? $params['vehicle_profile_id'] : null;
200
-
201
-        $response = Route4Me::makeRequst([
202
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
203
-            'method' => 'DELETE',
204
-            'HTTPHEADER' => 'Content-Type: application/json; Accept: application/json',
205
-        ]);
206
-
207
-        return $response;
208
-    }
209
-
210
-    /**
211
-     * @param  $profileParams - an array from the VehicleParameters object.
212
-     * @return array          - an array of parameters of the vehicle profiles.
213
-     * @throws \Route4Me\Exception\ApiError
214
-     */
215
-    public function getVehicleProfiles($profileParams)
216
-    {
217
-        $allQueryFields = ['with_pagination', 'page', 'perPage'];
218
-
219
-        $response = Route4Me::makeRequst([
220
-            'url' => Endpoint::VehicleProfiles,
221
-            'method' => 'GET',
222
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $profileParams),
223
-        ]);
224
-
225
-        return $response;
226
-    }
227
-
228
-    /**
229
-     * @param $profileParams - Vehicle profile body parameters
230
-     * @return array         - Created vehicle profile
231
-     * @throws \Route4Me\Exception\ApiError
232
-     */
233
-    public function createVehicleProfile($profileParams)
234
-    {
235
-        $excludeFields = [];
236
-        $allBodyFields = Route4Me::getObjectProperties(new VehicleProfile(), $excludeFields);
237
-
238
-        $response = Route4Me::makeRequst([
239
-            'url' => Endpoint::VehicleProfiles,
240
-            'method' => 'POST',
241
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $profileParams),
242
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
243
-        ]);
244
-
245
-        return $response;
246
-    }
247
-
248
-    public function getVehicleProfileById($vehicleProfileId)
249
-    {
250
-        $response = Route4Me::makeRequst([
251
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
252
-            'method' => 'GET',
253
-        ]);
254
-
255
-        return $response;
256
-    }
257
-
258
-    public function updateVehicleProfile($vehicleProfile)
259
-    {
260
-        $excludeFields = ['vehicle_profile_id', 'deleted_at', 'created_at', 'updated_at'];
261
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
262
-
263
-        $response = Route4Me::makeRequst([
264
-            'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfile['vehicle_profile_id'],
265
-            'method' => 'PATCH',
266
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleProfile),
267
-            'HTTPHEADER' => 'Content-Type: application/json'
268
-        ]);
269
-
270
-        return $response;
271
-    }
18
+	/** Vehicle profile ID
19
+	 * @var integer $vehicle_profile_id
20
+	 */
21
+	public $vehicle_profile_id;
22
+
23
+	/** Root member ID
24
+	 * @var integer $root_member_id
25
+	 */
26
+	public $root_member_id;
27
+
28
+	/** Vehicle profile name
29
+	 * @var string $name
30
+	 */
31
+	public $name;
32
+
33
+	/** Vehicle height
34
+	 * @var float $height
35
+	 */
36
+	public $height;
37
+
38
+	/** Vehicle width
39
+	 * @var float $width
40
+	 */
41
+	public $width;
42
+
43
+	/** Vehicle length
44
+	 * @var float $length
45
+	 */
46
+	public $length;
47
+
48
+	/** Vehicle weight
49
+	 * @var float $weight
50
+	 */
51
+	public $weight;
52
+
53
+	/** Maximum weight per axle.
54
+	 * @var float $max_weight_per_axle
55
+	 */
56
+	public $max_weight_per_axle;
57
+
58
+	/** When the profile deleted
59
+	 * @var string $deleted_at
60
+	 */
61
+	public $deleted_at;
62
+
63
+	/** When the profile created
64
+	 * @var string $created_at
65
+	 */
66
+	public $created_at;
67
+
68
+	/** When the profile updated
69
+	 * @var string $updated_at
70
+	 */
71
+	public $updated_at;
72
+
73
+	/** A type of the fuel
74
+	 * enum: ['unleaded 87','unleaded 89','unleaded 91',
75
+	 * 'unleaded 93','diesel','electric','hybrid']
76
+	 * @var string $fuel_type
77
+	 */
78
+	public $fuel_type;
79
+
80
+	/** Fuel consumption city
81
+	 * @var float $fuel_consumption_city
82
+	 */
83
+	public $fuel_consumption_city;
84
+
85
+	/** Fuel consumption in the highway area
86
+	 * @var float $fuel_consumption_highway
87
+	 */
88
+	public $fuel_consumption_highway;
89
+
90
+	/** Type of a hazardous material.
91
+	 * enum: ['general', 'explosives', 'flammable', 'inhalants', 'caustic', 'radioactive']
92
+	 * @var string $hazmat_type
93
+	 */
94
+	public $hazmat_type;
95
+
96
+	/** If true, the profile is predefined.
97
+	 * @var boolean $is_predefined
98
+	 */
99
+	public $is_predefined;
100
+
101
+	/** If true, the profile is default.
102
+	 * @var boolean $is_default
103
+	 */
104
+	public $is_default;
105
+
106
+	/** Height units (e.g. 'ft', 'm')
107
+	 * @var string $height_units
108
+	 */
109
+	public $height_units;
110
+
111
+	/** Width units (e.g. 'ft', 'm')
112
+	 * @var string $width_units
113
+	 */
114
+	public $width_units;
115
+
116
+	/** Length units (e.g. 'ft', 'm')
117
+	 * @var string $length_units
118
+	 */
119
+	public $length_units;
120
+
121
+	/** Weight units (e.g. 'lb', 'kg')
122
+	 * @var string $weight_units
123
+	 */
124
+	public $weight_units;
125
+
126
+	/** Maximum weight per axle units (e.g. 'lb', 'kg')
127
+	 * @var string $max_weight_per_axle_units
128
+	 */
129
+	public $max_weight_per_axle_units;
130
+
131
+	/** Fuel consumption units in the city area (e.g. mpg)
132
+	 * @var string $fuel_consumption_city_unit
133
+	 */
134
+	public $fuel_consumption_city_unit;
135
+
136
+	/** Fuel consumption units in the highway area (e.g. mpg)
137
+	 * @var string $fuel_consumption_highway_unit
138
+	 */
139
+	public $fuel_consumption_highway_unit;
140
+
141
+	/** Height UF value (e.g. "7'")
142
+	 * @var string $height_uf_value
143
+	 */
144
+	public $height_uf_value;
145
+
146
+	/** Width UF value (e.g. "8'")
147
+	 * @var string $width_uf_value
148
+	 */
149
+	public $width_uf_value;
150
+
151
+	/** Length UF value (e.g. "20'")
152
+	 * @var string $length_uf_value
153
+	 */
154
+	public $length_uf_value;
155
+
156
+	/** Weight UF value (e.g. "8,500lb")
157
+	 * @var string $weight_uf_value
158
+	 */
159
+	public $weight_uf_value;
160
+
161
+	/** Maximum weight per axle (UF value, e.g. "8,500lb")
162
+	 * @var string $max_weight_per_axle_uf_value
163
+	 */
164
+	public $max_weight_per_axle_uf_value;
165
+
166
+	/** Fuel consumption city (UF value, e.g. "20.01 mi/l")
167
+	 * @var string $fuel_consumption_city_uf_value
168
+	 */
169
+	public $fuel_consumption_city_uf_value;
170
+
171
+	/** Fuel consumption highway (UF value, e.g. "2,000.01 mpg")
172
+	 * @var string $fuel_consumption_highway_uf_value
173
+	 */
174
+	public $fuel_consumption_highway_uf_value;
175
+
176
+	public static function fromArray(array $params)
177
+	{
178
+		$vehicleProfile = new self();
179
+
180
+		foreach ($params as $key => $value) {
181
+			if (is_null(Common::getValue($params, $key))) {
182
+				continue;
183
+			}
184
+			if (property_exists($vehicleProfile, $key)) {
185
+				$vehicleProfile->$key = $value;
186
+			}
187
+		}
188
+
189
+		return $vehicleProfile;
190
+	}
191
+
192
+	public function __construct()
193
+	{
194
+		Route4Me::setBaseUrl("");
195
+	}
196
+
197
+	public function removeVehicleProfile($vehicleProfileId)
198
+	{
199
+		//$vehicleProfileID = isset($params['vehicle_profile_id']) ? $params['vehicle_profile_id'] : null;
200
+
201
+		$response = Route4Me::makeRequst([
202
+			'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
203
+			'method' => 'DELETE',
204
+			'HTTPHEADER' => 'Content-Type: application/json; Accept: application/json',
205
+		]);
206
+
207
+		return $response;
208
+	}
209
+
210
+	/**
211
+	 * @param  $profileParams - an array from the VehicleParameters object.
212
+	 * @return array          - an array of parameters of the vehicle profiles.
213
+	 * @throws \Route4Me\Exception\ApiError
214
+	 */
215
+	public function getVehicleProfiles($profileParams)
216
+	{
217
+		$allQueryFields = ['with_pagination', 'page', 'perPage'];
218
+
219
+		$response = Route4Me::makeRequst([
220
+			'url' => Endpoint::VehicleProfiles,
221
+			'method' => 'GET',
222
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $profileParams),
223
+		]);
224
+
225
+		return $response;
226
+	}
227
+
228
+	/**
229
+	 * @param $profileParams - Vehicle profile body parameters
230
+	 * @return array         - Created vehicle profile
231
+	 * @throws \Route4Me\Exception\ApiError
232
+	 */
233
+	public function createVehicleProfile($profileParams)
234
+	{
235
+		$excludeFields = [];
236
+		$allBodyFields = Route4Me::getObjectProperties(new VehicleProfile(), $excludeFields);
237
+
238
+		$response = Route4Me::makeRequst([
239
+			'url' => Endpoint::VehicleProfiles,
240
+			'method' => 'POST',
241
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $profileParams),
242
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
243
+		]);
244
+
245
+		return $response;
246
+	}
247
+
248
+	public function getVehicleProfileById($vehicleProfileId)
249
+	{
250
+		$response = Route4Me::makeRequst([
251
+			'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
252
+			'method' => 'GET',
253
+		]);
254
+
255
+		return $response;
256
+	}
257
+
258
+	public function updateVehicleProfile($vehicleProfile)
259
+	{
260
+		$excludeFields = ['vehicle_profile_id', 'deleted_at', 'created_at', 'updated_at'];
261
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
262
+
263
+		$response = Route4Me::makeRequst([
264
+			'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfile['vehicle_profile_id'],
265
+			'method' => 'PATCH',
266
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleProfile),
267
+			'HTTPHEADER' => 'Content-Type: application/json'
268
+		]);
269
+
270
+		return $response;
271
+	}
272 272
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/DataVehicle.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 
7 7
 class DataVehicle extends Common
8 8
 {
9
-    /** Reduced vehicle object
10
-     * @var VehicleReduced $vehicle
11
-     */
12
-    public $vehicle = [];
9
+	/** Reduced vehicle object
10
+	 * @var VehicleReduced $vehicle
11
+	 */
12
+	public $vehicle = [];
13 13
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleOrderResponse.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleOrderResponse extends Common
13 13
 {
14
-    /** Vehicle ID
15
-     * @var string $vehicle_id
16
-     */
17
-    public $vehicle_id;
14
+	/** Vehicle ID
15
+	 * @var string $vehicle_id
16
+	 */
17
+	public $vehicle_id;
18 18
 
19
-    /** Order ID
20
-     * @var integer $order_id
21
-     */
22
-    public $order_id;
19
+	/** Order ID
20
+	 * @var integer $order_id
21
+	 */
22
+	public $order_id;
23 23
 
24
-    public static function fromArray(array $params)
25
-    {
26
-        $ordParams = new self();
24
+	public static function fromArray(array $params)
25
+	{
26
+		$ordParams = new self();
27 27
 
28
-        foreach ($params as $key => $value) {
29
-            if (is_null(Common::getValue($params, $key))) {
30
-                continue;
31
-            }
32
-            if (property_exists($ordParams, $key)) {
33
-                $ordParams->$key = $value;
34
-            }
35
-        }
36
-        return $ordParams;
37
-    }
28
+		foreach ($params as $key => $value) {
29
+			if (is_null(Common::getValue($params, $key))) {
30
+				continue;
31
+			}
32
+			if (property_exists($ordParams, $key)) {
33
+				$ordParams->$key = $value;
34
+			}
35
+		}
36
+		return $ordParams;
37
+	}
38 38
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleTemporary.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,43 +11,43 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleTemporary extends Common
13 13
 {
14
-    /** The vehicle ID
15
-     * @var integer $vehicle_id
16
-     */
17
-    public $vehicle_id;
18
-
19
-    /** A license plate of the vehicle.
20
-     * @var string $vehicle_license_plate
21
-     */
22
-    public $vehicle_license_plate;
23
-
24
-    /** Member ID assigned to the temporary vehicle.
25
-     * @var string $assigned_member_id
26
-     */
27
-    public $assigned_member_id;
28
-
29
-    /** An expiration date of the temporary vehicle.
30
-     * @var string $expires_at
31
-     */
32
-    public $expires_at;
33
-
34
-    /** If true, an assignment forced.
35
-     * @var boolean $force_assignment
36
-     */
37
-    public $force_assignment;
38
-
39
-    public static function fromArray(array $params)
40
-    {
41
-        $vehicleTemp = new self();
42
-
43
-        foreach ($params as $key => $value) {
44
-            if (is_null(Common::getValue($params, $key))) {
45
-                continue;
46
-            }
47
-            if (property_exists($vehicleTemp, $key)) {
48
-                $vehicleTemp->$key = $value;
49
-            }
50
-        }
51
-        return $vehicleTemp;
52
-    }
14
+	/** The vehicle ID
15
+	 * @var integer $vehicle_id
16
+	 */
17
+	public $vehicle_id;
18
+
19
+	/** A license plate of the vehicle.
20
+	 * @var string $vehicle_license_plate
21
+	 */
22
+	public $vehicle_license_plate;
23
+
24
+	/** Member ID assigned to the temporary vehicle.
25
+	 * @var string $assigned_member_id
26
+	 */
27
+	public $assigned_member_id;
28
+
29
+	/** An expiration date of the temporary vehicle.
30
+	 * @var string $expires_at
31
+	 */
32
+	public $expires_at;
33
+
34
+	/** If true, an assignment forced.
35
+	 * @var boolean $force_assignment
36
+	 */
37
+	public $force_assignment;
38
+
39
+	public static function fromArray(array $params)
40
+	{
41
+		$vehicleTemp = new self();
42
+
43
+		foreach ($params as $key => $value) {
44
+			if (is_null(Common::getValue($params, $key))) {
45
+				continue;
46
+			}
47
+			if (property_exists($vehicleTemp, $key)) {
48
+				$vehicleTemp->$key = $value;
49
+			}
50
+		}
51
+		return $vehicleTemp;
52
+	}
53 53
 }
Please login to merge, or discard this patch.