@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -19,12 +19,12 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | $fgResult = $fGeoCoding->reverseGeocoding($geocodingParameters); |
| 21 | 21 | |
| 22 | -if ($geocodingParameters['format'] == 'json') { |
|
| 22 | +if ($geocodingParameters['format']=='json') { |
|
| 23 | 23 | foreach ($fgResult as $dest) { |
| 24 | 24 | Route4Me::simplePrint($dest); |
| 25 | 25 | echo "<br>"; |
| 26 | 26 | } |
| 27 | -} else { |
|
| 27 | +} else { |
|
| 28 | 28 | foreach ($fgResult['destination'] as $dest) { |
| 29 | 29 | Route4Me::simplePrint($dest); |
| 30 | 30 | echo "<br>"; |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | $bgResults = $fGeoCoding->forwardGeocoding($geocodingParameters); |
| 31 | 31 | |
| 32 | -if ($geocodingParameters['strExportFormat'] == 'json') { |
|
| 32 | +if ($geocodingParameters['strExportFormat']=='json') { |
|
| 33 | 33 | foreach ($bgResults as $bgResult) { |
| 34 | 34 | Route4Me::simplePrint($bgResult); |
| 35 | 35 | echo "<br>"; |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 12 | 12 | |
| 13 | 13 | // Create a custom note type |
| 14 | -$noteParameters=array( |
|
| 14 | +$noteParameters = array( |
|
| 15 | 15 | "type" => 'To Do', |
| 16 | 16 | "values" => array( |
| 17 | 17 | 'Pass a package', |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | $customNotes = $address->getAllCustomNoteTypes(); |
| 20 | 20 | |
| 21 | 21 | assert(!is_null($customNotes), "Can't retrieve all custom note types"); |
| 22 | -assert(sizeof($customNotes) > 0, "There is no custom note type in the user's account"); |
|
| 22 | +assert(sizeof($customNotes)>0, "There is no custom note type in the user's account"); |
|
| 23 | 23 | |
| 24 | -$randomCustomNoteID = $customNotes[rand(0,sizeof($customNotes)-1)]['note_custom_type_id']; |
|
| 24 | +$randomCustomNoteID = $customNotes[rand(0, sizeof($customNotes) - 1)]['note_custom_type_id']; |
|
| 25 | 25 | |
| 26 | 26 | // Remove a custom note type |
| 27 | 27 | $noteParameters = array( |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | assert(!is_null($route_destination_id), "Can't retrieve random address"); |
| 27 | 27 | |
| 28 | 28 | // Add a file note |
| 29 | -$noteParameters=array( |
|
| 29 | +$noteParameters = array( |
|
| 30 | 30 | "strFilename" => "notes.csv", |
| 31 | 31 | "route_id" => $route_id, |
| 32 | 32 | "address_id" => $route_destination_id, |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 5 | -require $root . '/vendor/autoload.php'; |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | +require $root.'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
| 8 | 8 | use Route4Me\Route; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | "dev_lng" => -83.244743347168, |
| 35 | 35 | "device_type" => "web", |
| 36 | 36 | "strUpdateType" => "dropoff", |
| 37 | - "strNoteContents" => "Test ". time() |
|
| 37 | + "strNoteContents" => "Test ".time() |
|
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | 40 | $address = new Address(); |
@@ -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\Route4Me; |
@@ -24,14 +24,14 @@ discard block |
||
| 24 | 24 | $json = json_decode(file_get_contents('./addresses.json'), true); |
| 25 | 25 | |
| 26 | 26 | $addresses = array(); |
| 27 | -foreach($json as $address) { |
|
| 27 | +foreach ($json as $address) { |
|
| 28 | 28 | $addresses[] = Address::fromArray($address); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $parameters = RouteParameters::fromArray(array( |
| 32 | 32 | "algorithm_type" => Algorithmtype::TSP, |
| 33 | 33 | "route_name" => "Single Driver Multiple TimeWindows 12 Stops", |
| 34 | - "route_date" => time() + 24*60*60, |
|
| 34 | + "route_date" => time() + 24 * 60 * 60, |
|
| 35 | 35 | "route_time" => 5 * 3600 + 30 * 60, |
| 36 | 36 | "distance_unit" => DistanceUnit::MILES, |
| 37 | 37 | "device_type" => DeviceType::WEB, |
@@ -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\Route4Me; |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | $json = json_decode(file_get_contents('./addresses.json'), true); |
| 26 | 26 | |
| 27 | 27 | $addresses = array(); |
| 28 | -foreach($json as $address) { |
|
| 28 | +foreach ($json as $address) { |
|
| 29 | 29 | $addresses[] = Address::fromArray($address); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $parameters = RouteParameters::fromArray(array( |
| 33 | 33 | "algorithm_type" => Algorithmtype::CVRP_TW_SD, |
| 34 | 34 | "route_name" => "Single Depot, Multiple Driver, No Time Window", |
| 35 | - "route_date" => time() + 24*60*60, |
|
| 35 | + "route_date" => time() + 24 * 60 * 60, |
|
| 36 | 36 | "route_time" => 60 * 60 * 7, |
| 37 | 37 | "rt" => TRUE, |
| 38 | 38 | "distance_unit" => DistanceUnit::MILES, |
@@ -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\Route4Me; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $addresses = array(); |
| 28 | 28 | |
| 29 | -foreach($json as $address) { |
|
| 29 | +foreach ($json as $address) { |
|
| 30 | 30 | $addresses[] = Address::fromArray($address); |
| 31 | 31 | } |
| 32 | 32 | |