@@ -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"); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'territory' => $territoryParams, |
| 29 | 29 | ]); |
| 30 | 30 | |
| 31 | -$result = (array) $territory->addTerritory($TerritoryParameters); |
|
| 31 | +$result = (array)$territory->addTerritory($TerritoryParameters); |
|
| 32 | 32 | assert(!is_null($result), "Cannot create a territory"); |
| 33 | 33 | |
| 34 | 34 | $territory_id = $result['territory_id']; |
@@ -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"); |
@@ -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 | } |
@@ -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); |
@@ -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']; |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | |
| 25 | 25 | $results = $activities->sendUserMessage($postParameters); |
| 26 | 26 | |
| 27 | -$msg = null != isset($results['status']) |
|
| 28 | - ? (1 == $results['status'] ? 'The user message was sent to the route ' : 'he user message could not sent to the route ') |
|
| 27 | +$msg = null!=isset($results['status']) |
|
| 28 | + ? (1==$results['status'] ? 'The user message was sent to the route ' : 'he user message could not sent to the route ') |
|
| 29 | 29 | : 'The user message could not sent to the route '; |
| 30 | 30 | |
| 31 | 31 | $msg .= ' with route_id='.$route_id; |
@@ -1,1 +1,1 @@ |
||
| 1 | -<?php
namespace Route4Me;
$root = realpath(dirname(__FILE__).'/../../');
require $root.'/vendor/autoload.php';
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_BAIL, 1);
// Set the api key in the Route4Me class
Route4Me::setApiKey(Constants::API_KEY);
$activityParameters = ActivityParameters::fromArray([
'limit' => 10,
'offset' => 0,
]);
$activities = new ActivityParameters();
$actResults = $activities->getActivities($activityParameters);
$results = $activities->getValue($actResults, 'results');
foreach ($results as $result) {
Route4Me::simplePrint($result);
echo '<br>';
}
|
|
| 2 | 1 | \ No newline at end of file |
| 2 | +<?php
namespace Route4Me;
$root = realpath(dirname(__FILE__).'/../../');
require $root.'/vendor/autoload.php';
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_BAIL, 1);
// Set the api key in the Route4Me class
Route4Me::setApiKey(Constants::API_KEY);
$activityParameters = ActivityParameters::fromArray([
'limit' => 10,
'offset' => 0, ]);
$activities = new ActivityParameters();
$actResults = $activities->getActivities($activityParameters);
$results = $activities->getValue($actResults, 'results');
foreach ($results as $result) {
Route4Me::simplePrint($result);
echo '<br>'; }
|
|
| 3 | 3 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | // Set the api key in the Route4Me class |
| 12 | 12 | Route4Me::setApiKey(Constants::API_KEY); |
| 13 | 13 | |
| 14 | -$MamberParames =Member::fromArray([ ]); |
|
| 14 | +$MamberParames = Member::fromArray([]); |
|
| 15 | 15 | |
| 16 | 16 | $member = new Member(); |
| 17 | 17 | |