@@ -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 |
@@ -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>'; |
@@ -35,4 +35,4 @@ |
||
35 | 35 | |
36 | 36 | $result = $route->update(); |
37 | 37 | |
38 | -Route4Me::simplePrint((array) $result->parameters); |
|
38 | +Route4Me::simplePrint((array)$result->parameters); |
@@ -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); |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | |
23 | 23 | $count = 0; |
24 | 24 | |
25 | -while ($route_id1 == $route_id2) { |
|
25 | +while ($route_id1==$route_id2) { |
|
26 | 26 | $route_id2 = $route->getRandomRouteId(0, 20); |
27 | 27 | |
28 | 28 | ++$count; |
29 | 29 | |
30 | - if ($count > 5) { |
|
30 | + if ($count>5) { |
|
31 | 31 | break; |
32 | 32 | } |
33 | 33 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | foreach ($addresses as $address) { |
44 | 44 | if (isset($address->is_depot)) { |
45 | - if (true == $address->is_depot) { |
|
45 | + if (true==$address->is_depot) { |
|
46 | 46 | $depot = $address; |
47 | 47 | break; |
48 | 48 | } |
@@ -25,11 +25,11 @@ |
||
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 | if (isset($routeResults['addresses'])) { |
31 | 31 | foreach ($routeResults['addresses'] as $key => $address) { |
32 | - $araddress = (array) $address; |
|
32 | + $araddress = (array)$address; |
|
33 | 33 | |
34 | 34 | if (isset($araddress['route_destination_id'])) { |
35 | 35 | echo 'route_destination_id='.$araddress['route_destination_id'].'<br>'; |
@@ -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']; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | $routeResults = $route->getRoutes($RouteParameters); |
20 | 20 | |
21 | 21 | foreach ($routeResults as $routeResult) { |
22 | - $results = (array) $routeResult; |
|
22 | + $results = (array)$routeResult; |
|
23 | 23 | |
24 | 24 | if (isset($results['route_id'])) { |
25 | 25 | echo 'Route ID - > '.$results['route_id'].'<br>'; |