@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $users = $member->getUsers(); |
| 22 | 22 | |
| 23 | 23 | assert(!is_null($users), 'Cannot retrieve list of the users'); |
| 24 | -assert(2 == sizeof($users), 'Cannot retrieve list of the users'); |
|
| 24 | +assert(2==sizeof($users), 'Cannot retrieve list of the users'); |
|
| 25 | 25 | assert(isset($users['results']), 'Cannot retrieve list of the users'); |
| 26 | 26 | assert(isset($users['total']), 'Cannot retrieve list of the users'); |
| 27 | 27 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | assert(!is_null($route_id), "Cannot retrieve a random route ID"); |
| 21 | 21 | |
| 22 | 22 | // Get a random address ID from selected route above |
| 23 | -$addressRand = (array) $route->GetRandomAddressFromRoute($route_id); |
|
| 23 | +$addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
| 24 | 24 | |
| 25 | 25 | $route->route_id = $route_id; |
| 26 | 26 | $route->route_destination_id = $addressRand['route_destination_id']; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | // Set the api key in the Route4Me class |
| 11 | 11 | Route4Me::setApiKey(Constants::API_KEY); |
| 12 | 12 | |
| 13 | -$now = new \DateTime(); |
|
| 13 | +$now = new \DateTime(); |
|
| 14 | 14 | |
| 15 | 15 | $schedCalendarParams = new ScheduleCalendarParameters(); |
| 16 | 16 | |
@@ -38,4 +38,4 @@ |
||
| 38 | 38 | |
| 39 | 39 | $result = $route->update(); |
| 40 | 40 | |
| 41 | -Route4Me::simplePrint((array) $result->parameters); |
|
| 41 | +Route4Me::simplePrint((array)$result->parameters); |
|
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $users = $member->getUsers(); |
| 19 | 19 | |
| 20 | 20 | assert(!is_null($users), 'Cannot retrieve list of the users'); |
| 21 | -assert(2 == sizeof($users), 'Cannot retrieve list of the users'); |
|
| 21 | +assert(2==sizeof($users), 'Cannot retrieve list of the users'); |
|
| 22 | 22 | assert(isset($users['results']), 'Cannot retrieve list of the users'); |
| 23 | 23 | assert(isset($users['total']), 'Cannot retrieve list of the users'); |
| 24 | 24 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $route = new Route(); |
| 51 | 51 | |
| 52 | -$assignedRoute= $route->getRoutes(['route_id' => $routeId]); |
|
| 52 | +$assignedRoute = $route->getRoutes(['route_id' => $routeId]); |
|
| 53 | 53 | |
| 54 | 54 | echo "Assigned member id -> ".$assignedRoute->parameters->{'member_id'}; |
| 55 | 55 | |
@@ -49,6 +49,6 @@ |
||
| 49 | 49 | |
| 50 | 50 | $route = new Route(); |
| 51 | 51 | |
| 52 | -$assignedRoute= $route->getRoutes(['route_id' => $routeId]); |
|
| 52 | +$assignedRoute = $route->getRoutes(['route_id' => $routeId]); |
|
| 53 | 53 | |
| 54 | 54 | Route4Me::simplePrint((array)$assignedRoute->vehicle, true); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $routeResults = $route->getRoutes($RouteParameters); |
| 19 | 19 | |
| 20 | 20 | foreach ($routeResults as $routeResult) { |
| 21 | - $results = (array) $routeResult; |
|
| 21 | + $results = (array)$routeResult; |
|
| 22 | 22 | |
| 23 | 23 | Route4Me::simplePrint($results); |
| 24 | 24 | |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | 'route_id' => $route_id, |
| 27 | 27 | ]; |
| 28 | 28 | |
| 29 | -$routeResults = (array) $route->getRoutePoints($params); |
|
| 29 | +$routeResults = (array)$route->getRoutePoints($params); |
|
| 30 | 30 | |
| 31 | 31 | if (isset($routeResults['addresses'])) { |
| 32 | 32 | foreach ($routeResults['addresses'] as $key => $address) { |
| 33 | - $arAddress = (array) $address; |
|
| 33 | + $arAddress = (array)$address; |
|
| 34 | 34 | |
| 35 | 35 | if (isset($araddress['route_destination_id'])) { |
| 36 | 36 | echo 'route_destination_id='.$arAddress['route_destination_id'].'<br>'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | if (isset($arAddress['path_to_next'])) { |
| 40 | 40 | echo 'path_to_next:<br>'; |
| 41 | - Route4Me::simplePrint((array) $arAddress['path_to_next']); |
|
| 41 | + Route4Me::simplePrint((array)$arAddress['path_to_next']); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | echo '<br>'; |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | 'route_id' => $route_id, |
| 26 | 26 | ]; |
| 27 | 27 | |
| 28 | -$routeResults = (array) $route->getRoutePoints($params); |
|
| 28 | +$routeResults = (array)$route->getRoutePoints($params); |
|
| 29 | 29 | |
| 30 | 30 | Route4Me::simplePrint($routeResults, true); |