@@ -17,7 +17,7 @@ |
||
17 | 17 | $customNotes = $addressNote->getAllCustomNoteTypes(); |
18 | 18 | |
19 | 19 | assert(!is_null($customNotes), "Cannot retrieve all custom note types"); |
20 | -assert(sizeof($customNotes) > 0, "There is no custom note type in the user's account"); |
|
20 | +assert(sizeof($customNotes)>0, "There is no custom note type in the user's account"); |
|
21 | 21 | |
22 | 22 | $randomCustomNoteID = $customNotes[rand(0, sizeof($customNotes) - 1)]['note_custom_type_id']; |
23 | 23 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | assert(!is_null($route_id), "Cannot retrieve random route_id"); |
20 | 20 | |
21 | 21 | // Get random address's id from selected route above |
22 | -$addressRand = (array) $route->GetRandomAddressFromRoute($route_id); |
|
22 | +$addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
23 | 23 | $route_destination_id = $addressRand['route_destination_id']; |
24 | 24 | |
25 | 25 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | echo '========== Notes ==================<br>'; |
58 | 58 | echo 'note_id --> '.$note['note_id'].'<br>'; |
59 | 59 | $content = isset($note['contents']) ? $note['contents'] : ''; |
60 | - if (strlen($content) > 0) { |
|
60 | + if (strlen($content)>0) { |
|
61 | 61 | echo "contents --> $content".'<br>'; |
62 | 62 | } |
63 | 63 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | assert(!is_null($routeId), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from the above selected route |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($routeId); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($routeId); |
|
22 | 22 | $route_destination_id = $addressRand['route_destination_id']; |
23 | 23 | |
24 | 24 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | assert(!is_null($route_id), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from selected route above |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($route_id); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
22 | 22 | $route_destination_id = $addressRand['route_destination_id']; |
23 | 23 | |
24 | 24 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | assert(!is_null($route_id), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from selected route above |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($route_id); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
22 | 22 | $route_destination_id = $addressRand['route_destination_id']; |
23 | 23 | |
24 | 24 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
@@ -41,4 +41,4 @@ discard block |
||
41 | 41 | |
42 | 42 | $address1 = $addressNote->AddAddressNote($noteParameters); |
43 | 43 | |
44 | -Route4Me::simplePrint((array) $address1, true); |
|
44 | +Route4Me::simplePrint((array)$address1, true); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | assert(!is_null($routeId), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from selected route above |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($routeId); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($routeId); |
|
22 | 22 | |
23 | 23 | if (isset($addressRand['is_depot'])) { |
24 | 24 | if ($addressRand['is_depot']) { |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | // Get random address's id from selected route above |
32 | -$addressRand = (array) $route->GetRandomAddressFromRoute($routeId); |
|
32 | +$addressRand = (array)$route->GetRandomAddressFromRoute($routeId); |
|
33 | 33 | $route_destination_id = $addressRand['route_destination_id']; |
34 | 34 | |
35 | 35 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
36 | 36 | |
37 | 37 | // Mark the address as detected as deoarted |
38 | -$addressParameters = (array) Address::fromArray([ |
|
38 | +$addressParameters = (array)Address::fromArray([ |
|
39 | 39 | 'route_id' => $routeId, |
40 | 40 | 'route_destination_id' => $route_destination_id, |
41 | 41 | 'is_departed' => true, |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | assert(!is_null($routeId), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from selected route above |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($routeId); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($routeId); |
|
22 | 22 | $optimization_problem_id = $addressRand['optimization_problem_id']; |
23 | 23 | |
24 | 24 | assert(!is_null($optimization_problem_id), "Cannot retrieve random address"); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | // Add an address to the optimization |
27 | 27 | $addresses = []; |
28 | 28 | |
29 | -$address1 = (array) Address::fromArray([ |
|
29 | +$address1 = (array)Address::fromArray([ |
|
30 | 30 | 'address' => '717 5th Ave New York, NY 10021', |
31 | 31 | 'alias' => 'Giorgio Armani', |
32 | 32 | 'lat' => 40.7669692, |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $addresses[0] = $address1; |
38 | 38 | |
39 | -$OptimizationParameters = (array) OptimizationProblem::fromArray([ |
|
39 | +$OptimizationParameters = (array)OptimizationProblem::fromArray([ |
|
40 | 40 | 'optimization_problem_id' => $optimization_problem_id, |
41 | 41 | 'addresses' => $addresses, |
42 | 42 | 'reoptimize' => 1, |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | assert(!is_null($routeId), "Cannot retrieve random route_id"); |
19 | 19 | |
20 | 20 | // Get random address's id from selected route above |
21 | -$addressRand = (array) $route->GetRandomAddressFromRoute($routeId); |
|
21 | +$addressRand = (array)$route->GetRandomAddressFromRoute($routeId); |
|
22 | 22 | $route_destination_id = $addressRand['route_destination_id']; |
23 | 23 | |
24 | 24 | assert(!is_null($route_destination_id), "Cannot retrieve random address"); |
@@ -28,4 +28,4 @@ discard block |
||
28 | 28 | |
29 | 29 | $addressRetrieved = $address->getAddress($routeId, $route_destination_id); |
30 | 30 | |
31 | -Route4Me::simplePrint((array) $addressRetrieved); |
|
31 | +Route4Me::simplePrint((array)$addressRetrieved); |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | // Add the destinations to the route |
21 | 21 | $addresses = []; |
22 | 22 | |
23 | -$address1 = (array) Address::fromArray([ |
|
23 | +$address1 = (array)Address::fromArray([ |
|
24 | 24 | 'address' => '146 Bill Johnson Rd NE Milledgeville GA 31061', |
25 | 25 | 'lat' => 33.143526, |
26 | 26 | 'lng' => -83.240354, |
27 | 27 | 'time' => 0, |
28 | 28 | ]); |
29 | 29 | |
30 | -$address2 = (array) Address::fromArray([ |
|
30 | +$address2 = (array)Address::fromArray([ |
|
31 | 31 | 'address' => '222 Blake Cir Milledgeville GA 31061', |
32 | 32 | 'lat' => 33.177852, |
33 | 33 | 'lng' => -83.263535, |
@@ -48,4 +48,4 @@ discard block |
||
48 | 48 | |
49 | 49 | $result = $route1->addAddresses($routeParameters); |
50 | 50 | |
51 | -Route4Me::simplePrint((array) $result); |
|
51 | +Route4Me::simplePrint((array)$result); |