@@ -400,7 +400,7 @@ |
||
| 400 | 400 | $this->assertInstanceOf(ResponsePagination::class, $result); |
| 401 | 401 | $this->assertNotNull($result->current_page); |
| 402 | 402 | $this->assertIsArray($result->results); |
| 403 | - if (count($result->results) > 0) { |
|
| 403 | + if (count($result->results)>0) { |
|
| 404 | 404 | $this->assertInstanceOf(ResponseAddress::class, $result->results[0]); |
| 405 | 405 | } |
| 406 | 406 | } |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | |
| 528 | 528 | $vehicleProfile = new VehicleProfile(); |
| 529 | 529 | |
| 530 | - $vehProfileId = self::$createdVehicleProfiles[sizeof(self::$createdVehicleProfiles)-1]['vehicle_profile_id']; |
|
| 530 | + $vehProfileId = self::$createdVehicleProfiles[sizeof(self::$createdVehicleProfiles) - 1]['vehicle_profile_id']; |
|
| 531 | 531 | |
| 532 | 532 | $result = $vehicleProfile->removeVehicleProfile($vehProfileId); |
| 533 | 533 | |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | |
| 548 | 548 | $vehicleProfile = new VehicleProfile(); |
| 549 | 549 | |
| 550 | - $vehProfileId = self::$createdVehicleProfiles[sizeof(self::$createdVehicleProfiles)-1]['vehicle_profile_id']; |
|
| 550 | + $vehProfileId = self::$createdVehicleProfiles[sizeof(self::$createdVehicleProfiles) - 1]['vehicle_profile_id']; |
|
| 551 | 551 | |
| 552 | 552 | $result = $vehicleProfile->getVehicleProfileById($vehProfileId); |
| 553 | 553 | |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | { |
| 604 | 604 | $vehicle = new Vehicle(); |
| 605 | 605 | |
| 606 | - $vehicle->vehicle_alias = self::$createdVehicles[0]['vehicle_alias'] .' Updated'; |
|
| 606 | + $vehicle->vehicle_alias = self::$createdVehicles[0]['vehicle_alias'].' Updated'; |
|
| 607 | 607 | $vehicle->vehicle_vin = '11111111111111111'; |
| 608 | 608 | $vehicle->vehicle_id = self::$createdVehicles[0]['vehicle_id']; |
| 609 | 609 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | public function getSchedule(string $scheduleId) : Schedule |
| 68 | 68 | { |
| 69 | 69 | return $this->toSchedule(Route4Me::makeRequst([ |
| 70 | - 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES . '/' . $scheduleId, |
|
| 70 | + 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES.'/'.$scheduleId, |
|
| 71 | 71 | 'method' => 'GET' |
| 72 | 72 | ])); |
| 73 | 73 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | 'advance_interval', 'advance_schedule_interval_days', 'schedule', 'timezone']; |
| 164 | 164 | |
| 165 | 165 | return $this->toSchedule(Route4Me::makeRequst([ |
| 166 | - 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES . '/' . $scheduleId, |
|
| 166 | + 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES.'/'.$scheduleId, |
|
| 167 | 167 | 'method' => 'PUT', |
| 168 | 168 | 'HTTPHEADER' => 'Content-Type: application/json', |
| 169 | 169 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | public function deleteSchedule(string $scheduleId, bool $withRoutes = false) : Schedule |
| 186 | 186 | { |
| 187 | 187 | return $this->toSchedule(Route4Me::makeRequst([ |
| 188 | - 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES . '/' . $scheduleId, |
|
| 188 | + 'url' => Endpoint::RECURRING_ROUTES_SCHEDULES.'/'.$scheduleId, |
|
| 189 | 189 | 'method' => 'DELETE', |
| 190 | 190 | 'query' => ['with_routes' => $withRoutes] |
| 191 | 191 | ])); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | public function getRouteSchedule(string $route_id) : RouteSchedule |
| 229 | 229 | { |
| 230 | 230 | return $this->toRouteSchedule(Route4Me::makeRequst([ |
| 231 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES . '/' . $route_id, |
|
| 231 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES.'/'.$route_id, |
|
| 232 | 232 | 'method' => 'GET' |
| 233 | 233 | ])); |
| 234 | 234 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $allBodyFields = ['schedule_uid', 'member_id', 'vehicle_id']; |
| 318 | 318 | |
| 319 | 319 | return $this->toRouteSchedule(Route4Me::makeRequst([ |
| 320 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES . '/' . $route_id, |
|
| 320 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES.'/'.$route_id, |
|
| 321 | 321 | 'method' => 'PUT', |
| 322 | 322 | 'HTTPHEADER' => 'Content-Type: application/json', |
| 323 | 323 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | public function deleteRouteSchedules(string $route_id) : bool |
| 337 | 337 | { |
| 338 | 338 | $result = Route4Me::makeRequst([ |
| 339 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES . '/' . $route_id, |
|
| 339 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES.'/'.$route_id, |
|
| 340 | 340 | 'method' => 'DELETE' |
| 341 | 341 | ]); |
| 342 | 342 | return (isset($result['status']) ? $result['status'] : false); |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | public function deleteRouteSchedule(string $route_id) : RouteSchedule |
| 355 | 355 | { |
| 356 | 356 | return $this->toRouteSchedule(Route4Me::makeRequst([ |
| 357 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES . '/' . $route_id . '/items', |
|
| 357 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES.'/'.$route_id.'/items', |
|
| 358 | 358 | 'method' => 'DELETE' |
| 359 | 359 | ])); |
| 360 | 360 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | 'advance_interval', 'advance_schedule_interval_days', 'schedule', 'timezone']; |
| 386 | 386 | |
| 387 | 387 | return $this->toRouteSchedule(Route4Me::makeRequst([ |
| 388 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE . '/' . $route_id, |
|
| 388 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE.'/'.$route_id, |
|
| 389 | 389 | 'method' => 'PUT', |
| 390 | 390 | 'HTTPHEADER' => 'Content-Type: application/json', |
| 391 | 391 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | public function getRouteSchedulePreview(string $route_id, string $start, string $end) : array |
| 407 | 407 | { |
| 408 | 408 | return Route4Me::makeRequst([ |
| 409 | - 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES . '/' . $route_id . '/preview', |
|
| 409 | + 'url' => Endpoint::RECURRING_ROUTES_ROUTE_SCHEDULES.'/'.$route_id.'/preview', |
|
| 410 | 410 | 'method' => 'GET', |
| 411 | 411 | 'query' => ['start' => $start, 'end' => $end] |
| 412 | 412 | ]); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | public function isScheduledRouteCopy(string $route_id) : bool |
| 425 | 425 | { |
| 426 | 426 | $result = Route4Me::makeRequst([ |
| 427 | - 'url' => Endpoint::RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY . '/' . $route_id, |
|
| 427 | + 'url' => Endpoint::RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY.'/'.$route_id, |
|
| 428 | 428 | 'method' => 'GET' |
| 429 | 429 | ]); |
| 430 | 430 | return (isset($result['status']) ? $result['status'] : false); |
@@ -28,5 +28,5 @@ |
||
| 28 | 28 | * Values of the custom note type |
| 29 | 29 | * @var array |
| 30 | 30 | */ |
| 31 | - public $note_custom_type_values=[]; |
|
| 31 | + public $note_custom_type_values = []; |
|
| 32 | 32 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'url' => Endpoint::ADDRESS_BOOK_GROUP, |
| 25 | 25 | 'method' => 'GET', |
| 26 | 26 | 'query' => [ |
| 27 | - 'group_id' => isset($params['group_id']) ? $params['group_id'] : null, |
|
| 27 | + 'group_id' => isset($params['group_id']) ? $params['group_id'] : null, |
|
| 28 | 28 | ], |
| 29 | 29 | ]); |
| 30 | 30 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'method' => 'GET', |
| 104 | 104 | 'query' => [ |
| 105 | 105 | 'offset' => isset($params['offset']) ? $params['offset'] : null, |
| 106 | - 'limit' => isset($params['limit']) ? $params['limit'] : null, |
|
| 106 | + 'limit' => isset($params['limit']) ? $params['limit'] : null, |
|
| 107 | 107 | ], |
| 108 | 108 | ]); |
| 109 | 109 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $abGroups = self::getAddressBookGroups($params); |
| 116 | 116 | |
| 117 | - if (isset($abGroups) && sizeof($abGroups) > 1) { |
|
| 117 | + if (isset($abGroups) && sizeof($abGroups)>1) { |
|
| 118 | 118 | $groupsSize = sizeof($abGroups); |
| 119 | 119 | |
| 120 | 120 | $randomGroupIndex = rand(0, $groupsSize - 1); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public static function getAddressBookGroupIdByName($name) |
| 134 | 134 | { |
| 135 | - $abGroups = self::getAddressBookGroups(['offset'=>0,'limit'=>100]); |
|
| 135 | + $abGroups = self::getAddressBookGroups(['offset'=>0, 'limit'=>100]); |
|
| 136 | 136 | |
| 137 | 137 | $abGroupId = []; |
| 138 | 138 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AddressBookLocationSearchResponse |
| 8 | 8 | { |
| 9 | - public $results=[]; |
|
| 9 | + public $results = []; |
|
| 10 | 10 | public $total; |
| 11 | - public $fields=[]; |
|
| 11 | + public $fields = []; |
|
| 12 | 12 | } |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | ]; |
| 533 | 533 | |
| 534 | 534 | return $this->toResponseAddress(Route4Me::makeRequst([ |
| 535 | - 'url' => Endpoint::ADDRESSES . '/' . $addressId, |
|
| 535 | + 'url' => Endpoint::ADDRESSES.'/'.$addressId, |
|
| 536 | 536 | 'method' => 'PUT', |
| 537 | 537 | 'HTTPHEADER' => 'Content-Type: application/json', |
| 538 | 538 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | public function getAddressesAsynchronousJobStatus(string $jobId) : StatusChecker |
| 887 | 887 | { |
| 888 | 888 | return new StatusChecker(Route4Me::makeRequst([ |
| 889 | - 'url' => Endpoint::ADDRESSES_JOB_TRACKER_STATUS . '/' . $jobId, |
|
| 889 | + 'url' => Endpoint::ADDRESSES_JOB_TRACKER_STATUS.'/'.$jobId, |
|
| 890 | 890 | 'method' => 'GET', |
| 891 | 891 | 'HTTPHEADER' => 'Accept: application/json', |
| 892 | 892 | 'return_headers' => ['X-R4M-Async-Job-Running-Time'] |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | public function getAddressesAsynchronousJobResult(string $jobId) : bool |
| 906 | 906 | { |
| 907 | 907 | $result = Route4Me::makeRequst([ |
| 908 | - 'url' => Endpoint::ADDRESSES_JOB_TRACKER_RESULT . '/' . $jobId, |
|
| 908 | + 'url' => Endpoint::ADDRESSES_JOB_TRACKER_RESULT.'/'.$jobId, |
|
| 909 | 909 | 'method' => 'GET' |
| 910 | 910 | ]); |
| 911 | 911 | return (is_array($result) && isset($result['status']) && $result['status'] ? $result['status'] : false); |
@@ -223,13 +223,13 @@ discard block |
||
| 223 | 223 | switch ($key) { |
| 224 | 224 | case 'cached_lat': |
| 225 | 225 | case 'curbside_lat': |
| 226 | - if ($coord[$key] > 90 || $coord[$key] < -90) { |
|
| 226 | + if ($coord[$key]>90 || $coord[$key]<-90) { |
|
| 227 | 227 | return false; |
| 228 | 228 | } |
| 229 | 229 | break; |
| 230 | 230 | case 'cached_lng': |
| 231 | 231 | case 'curbside_lng': |
| 232 | - if ($coord[$key] > 180 || $coord[$key] < -180) { |
|
| 232 | + if ($coord[$key]>180 || $coord[$key]<-180) { |
|
| 233 | 233 | return false; |
| 234 | 234 | } |
| 235 | 235 | break; |
@@ -262,14 +262,14 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | $iRow = 1; |
| 264 | 264 | |
| 265 | - while (false !== ($rows = fgetcsv($csvFileHandle, $max_line_length, $delemietr))) { |
|
| 266 | - if ($rows[$ordersFieldsMapping['cached_lat']] && $rows[$ordersFieldsMapping['cached_lng']] && $rows[$ordersFieldsMapping['address_1']] && [null] !== $rows) { |
|
| 265 | + while (false!==($rows = fgetcsv($csvFileHandle, $max_line_length, $delemietr))) { |
|
| 266 | + if ($rows[$ordersFieldsMapping['cached_lat']] && $rows[$ordersFieldsMapping['cached_lng']] && $rows[$ordersFieldsMapping['address_1']] && [null]!==$rows) { |
|
| 267 | 267 | $cached_lat = 0.000; |
| 268 | 268 | $cached_lng = 0.000; |
| 269 | 269 | |
| 270 | 270 | foreach (['cached_lat', 'cached_lng', 'curbside_lat', 'curbside_lng'] as $coord) { |
| 271 | 271 | if (!$this->validateCoordinate([$coord => $rows[$ordersFieldsMapping[$coord]]])) { |
| 272 | - array_push($results['fail'], "$iRow --> Wrong " + $coord); |
|
| 272 | + array_push($results['fail'], "$iRow --> Wrong " +$coord); |
|
| 273 | 273 | ++$iRow; |
| 274 | 274 | continue; |
| 275 | 275 | } else { |
@@ -95,11 +95,11 @@ |
||
| 95 | 95 | * Telemetics connection vendor |
| 96 | 96 | * @var string |
| 97 | 97 | */ |
| 98 | - public $vendor ; |
|
| 98 | + public $vendor; |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * Telemetics connection type ID |
| 102 | 102 | * @var integer |
| 103 | 103 | */ |
| 104 | - public $vendor_id ; |
|
| 104 | + public $vendor_id; |
|
| 105 | 105 | } |