@@ -38,7 +38,7 @@ |
||
38 | 38 | assert(!is_null($route_destination_id), "Can't retrieve random address"); |
39 | 39 | |
40 | 40 | // Remove the destination from the optimization |
41 | -$params = array ( |
|
41 | +$params = array( |
|
42 | 42 | "optimization_problem_id" => $optimization_problem_id, |
43 | 43 | "route_destination_id" => $route_destination_id |
44 | 44 | ); |
@@ -52,5 +52,5 @@ |
||
52 | 52 | assert(isset($result->addresses), "Can't insert a destination into the route"); |
53 | 53 | |
54 | 54 | foreach ($result->addresses as $address) { |
55 | - echo "Address -> ".$address->address , ", Sequence number -> ".$address->sequence_no."<br>"; |
|
55 | + echo "Address -> ".$address->address, ", Sequence number -> ".$address->sequence_no."<br>"; |
|
56 | 56 | } |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | // Get random source route from test routes |
28 | 28 | $route = new Route(); |
29 | 29 | |
30 | -$route_id0 = $routes[rand(0, sizeof($routes)-1)]->route_id; |
|
30 | +$route_id0 = $routes[rand(0, sizeof($routes) - 1)]->route_id; |
|
31 | 31 | |
32 | -echo "<br> From the route -> ".$route_id0 ."<br>"; |
|
32 | +echo "<br> From the route -> ".$route_id0."<br>"; |
|
33 | 33 | |
34 | 34 | if (is_null($route_id0)) { |
35 | 35 | echo "Can't retrieve random route_id!.. Try again."; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $to_route_id = $routes[rand(0, sizeof($routes) - 1)]->route_id; |
52 | 52 | } |
53 | 53 | |
54 | -echo "<br> to the route -> ".$to_route_id ."<br>"; |
|
54 | +echo "<br> to the route -> ".$to_route_id."<br>"; |
|
55 | 55 | |
56 | 56 | if (is_null($to_route_id)) { |
57 | 57 | echo "Can't retrieve random route_id!.. Try again."; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Enum\DeviceType; |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | assert($status['status'], "Can't send GPS position to the selected route"); |
47 | 47 | |
48 | 48 | // Get the device tracking history from a time range |
49 | -$startDate = time() - 30*24*3600; |
|
50 | -$endDate = time() + 1*24*3600; |
|
49 | +$startDate = time() - 30 * 24 * 3600; |
|
50 | +$endDate = time() + 1 * 24 * 3600; |
|
51 | 51 | |
52 | 52 | $params = array( |
53 | 53 | 'route_id' => $routeId, |
@@ -23,7 +23,7 @@ |
||
23 | 23 | assert(!is_null($optimizationProblemId), "Can't retrieve a random optimization problem ID"); |
24 | 24 | |
25 | 25 | // Remove an optimization |
26 | -$params = array ( |
|
26 | +$params = array( |
|
27 | 27 | "optimization_problem_ids" => array( |
28 | 28 | "0" => $optimizationProblemId |
29 | 29 | ), |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | // Remove 2 random orders |
31 | 31 | $orderParameters = Order::fromArray(array( |
32 | - 'order_ids' => array ( |
|
32 | + 'order_ids' => array( |
|
33 | 33 | 0 => $randomOrderID1, |
34 | 34 | 1 => $randomOrderID2, |
35 | 35 | ) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | $avoidancezone = new AvoidanceZone(); |
14 | 14 | |
15 | -$queryparameters = array (); |
|
15 | +$queryparameters = array(); |
|
16 | 16 | |
17 | 17 | $azones = $avoidancezone->getAvoidanceZones($queryparameters); |
18 | 18 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | assert(!is_null($randomVehicleID), "Can't retrieve a random vehilce ID"); |
23 | 23 | |
24 | 24 | // Update the vehicle |
25 | -$vehicleParameters = Vehicle::fromArray(array ( |
|
25 | +$vehicleParameters = Vehicle::fromArray(array( |
|
26 | 26 | 'vehicle_id' => $randomVehicleID, |
27 | 27 | 'vehicle_model_year' => 2013, |
28 | 28 | 'vehicle_year_acquired' => 2016, |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | $vehicle = new Vehicle(); |
19 | 19 | |
20 | -$vehicleParameters = Vehicle::fromArray(array ( |
|
20 | +$vehicleParameters = Vehicle::fromArray(array( |
|
21 | 21 | 'vehicle_alias' => 'Peterbilt 579', |
22 | 22 | 'vehicle_vin' => '1NP5DB9X93N507873', |
23 | 23 | 'vehicle_license_plate' => 'PPV7516', |