@@ -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 @@ |
||
| 18 | 18 | |
| 19 | 19 | $randomLocation = $abLocation->getRandomAddressBookLocation($AddressBookLocationParameters); |
| 20 | 20 | |
| 21 | -if (assert(null != $randomLocation, 'Cannot get a randoma address book location')); |
|
| 21 | +if (assert(null!=$randomLocation, 'Cannot get a randoma address book location')); |
|
| 22 | 22 | |
| 23 | 23 | // Get the address book location by address_id |
| 24 | 24 | $addressID = $randomLocation['address_id']; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $address_id = $createdContact['address_id']; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -assert($address_id != -1, 'Creating of Address Book Location was failed. Try again!.. <br>'); |
|
| 31 | +assert($address_id!=-1, 'Creating of Address Book Location was failed. Try again!.. <br>'); |
|
| 32 | 32 | |
| 33 | 33 | echo 'Address Book Location with address_id = '.strval($address_id).' was successfully added<br>'; |
| 34 | 34 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $address_id = $abcResult['address_id']; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -assert($address_id != -1, 'Cannot create an address book location. <br><br>'); |
|
| 33 | +assert($address_id!=-1, 'Cannot create an address book location. <br><br>'); |
|
| 34 | 34 | |
| 35 | 35 | echo 'Address Book Location with <b>address_id = '.strval($address_id).'</b> and <b>first_name = '.$abcResult['first_name'].'</b> was successfully added<br>'; |
| 36 | 36 | |
@@ -40,6 +40,6 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | assert(isset($abcResult['first_name']), 'Cannot update the address book location. <br><br>'); |
| 42 | 42 | |
| 43 | -assert('Test First Name Updated' == $abcResult['first_name'], 'Cannot update the address book location. <br><br>'); |
|
| 43 | +assert('Test First Name Updated'==$abcResult['first_name'], 'Cannot update the address book location. <br><br>'); |
|
| 44 | 44 | |
| 45 | 45 | echo 'The field <b>first_name</b> in the address book location <b>'.$address_id.'</b> was update to <b>Test First Name Updated</b> successfuly <br>'; |
@@ -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, |