@@ -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 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | $abg = new AddressBookGroup(); |
19 | 19 | |
20 | - $createParameters= [ |
|
20 | + $createParameters = [ |
|
21 | 21 | 'group_name' => 'All Group', |
22 | 22 | 'group_color' => '92e1c0', |
23 | 23 | 'filter' => [ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | self::$createdGroups[] = $createdAddressBookGroup; |
39 | 39 | |
40 | - $createParameters= [ |
|
40 | + $createParameters = [ |
|
41 | 41 | 'group_name' => 'All Group', |
42 | 42 | 'group_color' => '92e1c0', |
43 | 43 | 'filter' => [ |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $groupId = self::$createdGroups[0]->group_id; |
115 | 115 | |
116 | - $updateParameters= [ |
|
116 | + $updateParameters = [ |
|
117 | 117 | 'group_id' => $groupId, |
118 | 118 | 'group_color' => '7bd148' |
119 | 119 | ]; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | $groupId = end(self::$createdGroups)->group_id; |
133 | 133 | |
134 | - $removeParameters= [ |
|
134 | + $removeParameters = [ |
|
135 | 135 | 'group_id' => $groupId |
136 | 136 | ]; |
137 | 137 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | public function testCreateAddressBookGroup() |
148 | 148 | { |
149 | - $createParameters= [ |
|
149 | + $createParameters = [ |
|
150 | 150 | 'group_name' => 'All Group', |
151 | 151 | 'group_color' => '92e2cd', |
152 | 152 | 'filter' => [ |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | foreach (self::$createdGroups as $createdGroup) { |
269 | 269 | $groupId = $createdGroup->group_id; |
270 | 270 | |
271 | - $removeParameters= [ |
|
271 | + $removeParameters = [ |
|
272 | 272 | 'group_id' => $groupId |
273 | 273 | ]; |
274 | 274 |