@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | |
19 | 19 | $territoryParams['type'] = TerritoryTypes::CIRCLE; |
20 | 20 | $territoryParams['data'] = [ |
21 | - '37.569752822786455,-77.47833251953125', |
|
22 | - '5000', |
|
21 | + '37.569752822786455,-77.47833251953125', |
|
22 | + '5000', |
|
23 | 23 | ]; |
24 | 24 | |
25 | 25 | $TerritoryParameters = Territory::fromArray([ |
26 | - 'territory_name' => 'Test Territory '.strval(rand(10000, 99999)), |
|
27 | - 'territory_color' => 'ff7700', |
|
28 | - 'territory' => $territoryParams, |
|
26 | + 'territory_name' => 'Test Territory '.strval(rand(10000, 99999)), |
|
27 | + 'territory_color' => 'ff7700', |
|
28 | + 'territory' => $territoryParams, |
|
29 | 29 | ]); |
30 | 30 | |
31 | 31 | $territory = new Territory(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | echo '---------------------------------------------------------------<br><br>'; |
42 | 42 | |
43 | 43 | $params = [ |
44 | - 'territory_id' => $territory_id, |
|
44 | + 'territory_id' => $territory_id, |
|
45 | 45 | ]; |
46 | 46 | |
47 | 47 | $result1 = $territory->getTerritory($params); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | $territory = new Territory(); |
32 | 32 | |
33 | -$result = (array) $territory->addTerritory($TerritoryParameters); |
|
33 | +$result = (array)$territory->addTerritory($TerritoryParameters); |
|
34 | 34 | |
35 | 35 | assert(!is_null($result), "Cannot create a territory"); |
36 | 36 | assert(isset($result['territory_id']), "Cannot create a territory"); |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | |
16 | 16 | // Select a terriotry with the enclosed addresses and orders from the list |
17 | 17 | $params = [ |
18 | - 'offset' => 0, |
|
19 | - 'limit' => 50, |
|
20 | - 'addresses' => 1, |
|
21 | - 'orders' => 1 |
|
18 | + 'offset' => 0, |
|
19 | + 'limit' => 50, |
|
20 | + 'addresses' => 1, |
|
21 | + 'orders' => 1 |
|
22 | 22 | ]; |
23 | 23 | |
24 | 24 | $results = $territory->getTerritories($params); |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | $territory1 = null; |
28 | 28 | |
29 | 29 | foreach ($results as $terr) { |
30 | - if (isset($terr['addresses'])) { |
|
31 | - if (sizeof($terr['addresses']) > 0) { |
|
32 | - $territory1 = $terr; |
|
33 | - break; |
|
34 | - } |
|
35 | - } |
|
30 | + if (isset($terr['addresses'])) { |
|
31 | + if (sizeof($terr['addresses']) > 0) { |
|
32 | + $territory1 = $terr; |
|
33 | + break; |
|
34 | + } |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | assert(isset($territory1['territory_id']), "Cannot retrieve a random territory ID"); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | // Get a territory with the addresses |
44 | 44 | $params = [ |
45 | - 'territory_id' => $territory_id, |
|
46 | - 'addresses' => 1, |
|
45 | + 'territory_id' => $territory_id, |
|
46 | + 'addresses' => 1, |
|
47 | 47 | ]; |
48 | 48 | |
49 | 49 | $result1 = $territory->getTerritory($params); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | foreach ($results as $terr) { |
30 | 30 | if (isset($terr['addresses'])) { |
31 | - if (sizeof($terr['addresses']) > 0) { |
|
31 | + if (sizeof($terr['addresses'])>0) { |
|
32 | 32 | $territory1 = $terr; |
33 | 33 | break; |
34 | 34 | } |
@@ -16,14 +16,14 @@ |
||
16 | 16 | |
17 | 17 | $territoryParams['type'] = TerritoryTypes::RECT; |
18 | 18 | $territoryParams['data'] = [ |
19 | - '43.51668853502909,-109.3798828125', |
|
20 | - '46.98025235521883,-101.865234375', |
|
19 | + '43.51668853502909,-109.3798828125', |
|
20 | + '46.98025235521883,-101.865234375', |
|
21 | 21 | ]; |
22 | 22 | |
23 | 23 | $TerritoryParameters = Territory::fromArray([ |
24 | - 'territory_name' => 'Test Rectangular Territory '.strval(rand(10000, 99999)), |
|
25 | - 'territory_color' => 'ff7700', |
|
26 | - 'territory' => $territoryParams, |
|
24 | + 'territory_name' => 'Test Rectangular Territory '.strval(rand(10000, 99999)), |
|
25 | + 'territory_color' => 'ff7700', |
|
26 | + 'territory' => $territoryParams, |
|
27 | 27 | ]); |
28 | 28 | |
29 | 29 | $territory = new Territory(); |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | // Example refers to getting the address book locations |
12 | 12 | |
13 | 13 | $AddressBookLocationParameters = [ |
14 | - 'limit' => 30, |
|
15 | - 'offset' => 0, |
|
14 | + 'limit' => 30, |
|
15 | + 'offset' => 0, |
|
16 | 16 | ]; |
17 | 17 | |
18 | 18 | $abContacts = new AddressBookLocation(); |
@@ -22,6 +22,6 @@ discard block |
||
22 | 22 | $results = $abContacts->getValue($abcResults, 'results'); |
23 | 23 | |
24 | 24 | foreach ($results as $result) { |
25 | - Route4Me::simplePrint($result); |
|
26 | - echo '<br>'; |
|
25 | + Route4Me::simplePrint($result); |
|
26 | + echo '<br>'; |
|
27 | 27 | } |
@@ -14,15 +14,15 @@ |
||
14 | 14 | |
15 | 15 | // Create a config key |
16 | 16 | $createParams = Member::fromArray([ |
17 | - 'config_key' => 'My height', |
|
18 | - 'config_value' => '182', |
|
17 | + 'config_key' => 'My height', |
|
18 | + 'config_value' => '182', |
|
19 | 19 | ]); |
20 | 20 | |
21 | 21 | $response = $member->newMemberConfigKey($createParams); |
22 | 22 | |
23 | 23 | // Delete a config key |
24 | 24 | $removeParams = Member::fromArray([ |
25 | - 'config_key' => 'My height', |
|
25 | + 'config_key' => 'My height', |
|
26 | 26 | ]); |
27 | 27 | |
28 | 28 | $response = $member->removeMemberConfigKey($removeParams); |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | // Update existing configuration key data |
34 | 34 | $params = Member::fromArray([ |
35 | - 'config_key' => $randomKey, |
|
36 | - 'config_value' => $randomValue.' Updated', |
|
35 | + 'config_key' => $randomKey, |
|
36 | + 'config_value' => $randomValue.' Updated', |
|
37 | 37 | ]); |
38 | 38 | |
39 | 39 | $response = $member->updateMemberConfigKey($params); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $response = $member->getMemberConfigData($randomParams); |
22 | 22 | |
23 | 23 | assert(!is_null($response), 'Cannot retrieve all config data'); |
24 | -assert(2 == sizeof($response), 'Cannot retrieve all config data'); |
|
24 | +assert(2==sizeof($response), 'Cannot retrieve all config data'); |
|
25 | 25 | assert(isset($response['data']), 'Cannot retrieve all config data'); |
26 | 26 | |
27 | 27 | $randIndex = rand(0, sizeof($response['data']) - 1); |
@@ -39,6 +39,6 @@ discard block |
||
39 | 39 | $response = $member->updateMemberConfigKey($params); |
40 | 40 | |
41 | 41 | assert(isset($response['affected']), 'Cannot update a config data'); |
42 | -assert('1' == isset($response['affected']), 'Cannot update a config data'); |
|
42 | +assert('1'==isset($response['affected']), 'Cannot update a config data'); |
|
43 | 43 | |
44 | 44 | Route4Me::simplePrint($response); |
@@ -30,15 +30,15 @@ |
||
30 | 30 | echo "randomKey -> $randomKey <br><br>"; |
31 | 31 | |
32 | 32 | $params = Member::fromArray([ |
33 | - 'config_key' => $randomKey, |
|
33 | + 'config_key' => $randomKey, |
|
34 | 34 | ]); |
35 | 35 | |
36 | 36 | $response = $member->getMemberConfigData($params); |
37 | 37 | |
38 | 38 | foreach ($response as $key => $value) { |
39 | - if (is_array($value)) { |
|
40 | - Route4Me::simplePrint($value); |
|
41 | - } else { |
|
42 | - echo "$key => $value <br>"; |
|
43 | - } |
|
39 | + if (is_array($value)) { |
|
40 | + Route4Me::simplePrint($value); |
|
41 | + } else { |
|
42 | + echo "$key => $value <br>"; |
|
43 | + } |
|
44 | 44 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $response = $member->getMemberConfigData($randomParams); |
22 | 22 | |
23 | 23 | assert(!is_null($response), 'Cannot retrieve all config data'); |
24 | -assert(2 == sizeof($response), 'Cannot retrieve all config data'); |
|
24 | +assert(2==sizeof($response), 'Cannot retrieve all config data'); |
|
25 | 25 | assert(isset($response['data']), 'Cannot retrieve all config data'); |
26 | 26 | |
27 | 27 | $randomKey = $response['data'][rand(0, sizeof($response['data']) - 1)]['config_key']; |
@@ -11,14 +11,14 @@ |
||
11 | 11 | Route4Me::setApiKey(Constants::API_KEY); |
12 | 12 | |
13 | 13 | $params = [ |
14 | - Member::fromArray([ |
|
15 | - 'config_key' => 'hide_sharing_in_route_parameters_dialog', |
|
16 | - 'config_value' => 'false', |
|
17 | - ]), |
|
18 | - Member::fromArray([ |
|
19 | - 'config_key' => 'disable_telematics_popup_overlay', |
|
20 | - 'config_value' => 'false', |
|
21 | - ]) |
|
14 | + Member::fromArray([ |
|
15 | + 'config_key' => 'hide_sharing_in_route_parameters_dialog', |
|
16 | + 'config_value' => 'false', |
|
17 | + ]), |
|
18 | + Member::fromArray([ |
|
19 | + 'config_key' => 'disable_telematics_popup_overlay', |
|
20 | + 'config_value' => 'false', |
|
21 | + ]) |
|
22 | 22 | ]; |
23 | 23 | |
24 | 24 | $member = new Member(); |
@@ -17,13 +17,13 @@ |
||
17 | 17 | $response = $member->getMemberConfigData($params); |
18 | 18 | |
19 | 19 | foreach ($response as $key => $value) { |
20 | - if (is_array($value)) { |
|
21 | - foreach ($value as $v1) { |
|
22 | - Route4Me::simplePrint($v1); |
|
23 | - echo '<br>'; |
|
24 | - } |
|
25 | - } else { |
|
26 | - echo "$key => $value <br>"; |
|
27 | - } |
|
28 | - echo '<br>'; |
|
20 | + if (is_array($value)) { |
|
21 | + foreach ($value as $v1) { |
|
22 | + Route4Me::simplePrint($v1); |
|
23 | + echo '<br>'; |
|
24 | + } |
|
25 | + } else { |
|
26 | + echo "$key => $value <br>"; |
|
27 | + } |
|
28 | + echo '<br>'; |
|
29 | 29 | } |