@@ -18,9 +18,9 @@ |
||
18 | 18 | public static function getName(int $state) : string |
19 | 19 | { |
20 | 20 | $refl = new ReflectionClass(__CLASS__); |
21 | - foreach($refl->getConstants() AS $key => $val) |
|
21 | + foreach ($refl->getConstants() AS $key => $val) |
|
22 | 22 | { |
23 | - if($val == $state) return $key; |
|
23 | + if ($val==$state) return $key; |
|
24 | 24 | } |
25 | 25 | return 'UNKNOWN'; |
26 | 26 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | if (is_null($result) || !is_array($result)) return null; |
182 | 182 | |
183 | 183 | foreach ($result as $custNoteType) { |
184 | - if (isset($custNoteType["note_custom_type"]) && $custNoteType["note_custom_type"] == $params) { |
|
184 | + if (isset($custNoteType["note_custom_type"]) && $custNoteType["note_custom_type"]==$params) { |
|
185 | 185 | return $custNoteType; |
186 | 186 | } |
187 | 187 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $customArray = []; |
228 | 228 | |
229 | 229 | foreach ($params as $key => $value) { |
230 | - if (false !== strpos($key, 'custom_note_type')) { |
|
230 | + if (false!==strpos($key, 'custom_note_type')) { |
|
231 | 231 | $customArray[$key] = $value; |
232 | 232 | } |
233 | 233 | } |
@@ -123,11 +123,11 @@ |
||
123 | 123 | $allVendors = self::GetTelematicsVendors(null); |
124 | 124 | $vendorsNumber = sizeof($allVendors['vendors']); |
125 | 125 | |
126 | - if ($vendorsNumber < $limit) { |
|
127 | - if ($vendorsNumber > $offset) { |
|
126 | + if ($vendorsNumber<$limit) { |
|
127 | + if ($vendorsNumber>$offset) { |
|
128 | 128 | $limit = $vendorsNumber; |
129 | 129 | } else { |
130 | - if ($vendorsNumber == $offset) { |
|
130 | + if ($vendorsNumber==$offset) { |
|
131 | 131 | return $allVendors['vendors'][$offset]->{'vendor_id'}; |
132 | 132 | } else { |
133 | 133 | echo 'The vendors numbers are less than offset'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | $route = null; |
35 | 35 | |
36 | - if ($route_id === null) { |
|
36 | + if ($route_id===null) { |
|
37 | 37 | throw new ApiError('There is no any route.'); |
38 | 38 | } |
39 | 39 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | $vehicle = null; |
53 | 53 | |
54 | - if ($vehicle_id === null) { |
|
54 | + if ($vehicle_id===null) { |
|
55 | 55 | throw new ApiError('There is no any vehicle.'); |
56 | 56 | } |
57 | 57 | |
@@ -83,5 +83,5 @@ discard block |
||
83 | 83 | |
84 | 84 | print_r($route_schedule); |
85 | 85 | } catch (\Exception $e) { |
86 | - echo $e->getMessage() . PHP_EOL; |
|
86 | + echo $e->getMessage().PHP_EOL; |
|
87 | 87 | } |
@@ -26,5 +26,5 @@ |
||
26 | 26 | |
27 | 27 | print_r($schedule); |
28 | 28 | } catch (\Exception $e) { |
29 | - echo $e->getMessage() . PHP_EOL; |
|
29 | + echo $e->getMessage().PHP_EOL; |
|
30 | 30 | } |
@@ -20,5 +20,5 @@ |
||
20 | 20 | $schedule = $schedules->getSchedule('1515E9A65DD2DEF79CAD7A7E68D91515'); |
21 | 21 | print_r($schedule); |
22 | 22 | } catch (\Exception $e) { |
23 | - echo $e->getMessage() . PHP_EOL; |
|
23 | + echo $e->getMessage().PHP_EOL; |
|
24 | 24 | } |
@@ -23,5 +23,5 @@ |
||
23 | 23 | $schedule = $schedules->getScheduledRoutesCopies($route_id, $schedule_uid, $route_date); |
24 | 24 | print_r($schedule); |
25 | 25 | } catch (\Exception $e) { |
26 | - echo $e->getMessage() . PHP_EOL; |
|
26 | + echo $e->getMessage().PHP_EOL; |
|
27 | 27 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $list = $schedules->getAllSchedules(); |
23 | 23 | print_r($list); |
24 | 24 | } catch (\Exception $e) { |
25 | - echo $e->getMessage() . PHP_EOL; |
|
25 | + echo $e->getMessage().PHP_EOL; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | //********************************************************************** |
@@ -31,5 +31,5 @@ discard block |
||
31 | 31 | $list = $schedules->getSchedules(2, 5); |
32 | 32 | print_r($list); |
33 | 33 | } catch (\Exception $e) { |
34 | - echo $e->getMessage() . PHP_EOL; |
|
34 | + echo $e->getMessage().PHP_EOL; |
|
35 | 35 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $list = $schedules->getAllRouteSchedules(); |
23 | 23 | print_r($list); |
24 | 24 | } catch (\Exception $e) { |
25 | - echo $e->getMessage() . PHP_EOL; |
|
25 | + echo $e->getMessage().PHP_EOL; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | //********************************************************************** |
@@ -31,5 +31,5 @@ discard block |
||
31 | 31 | $list = $schedules->getRouteSchedules(1, 5); |
32 | 32 | print_r($list); |
33 | 33 | } catch (\Exception $e) { |
34 | - echo $e->getMessage() . PHP_EOL; |
|
34 | + echo $e->getMessage().PHP_EOL; |
|
35 | 35 | } |