@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | |
21 | 21 | private $shutdownRegistered = false; |
22 | 22 | |
23 | - private static $instances = [ ]; |
|
23 | + private static $instances = []; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @var Client |
27 | 27 | */ |
28 | 28 | private $client; |
29 | 29 | |
30 | - public static function getInstance($options = [ ]) |
|
30 | + public static function getInstance($options = []) |
|
31 | 31 | { |
32 | 32 | foreach (self::$instances as $instance) { |
33 | 33 | if ($instance['options'] == $options) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $dirPos = strrpos($dir, "src/API"); |
120 | 120 | $dir = substr($dir, 0, $dirPos); |
121 | 121 | |
122 | - $this->recordLocation = $dir . 'Resources/recordings/'; |
|
122 | + $this->recordLocation = $dir.'Resources/recordings/'; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | return $this->recordLocation; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | public function getRecordFilePath() |
129 | 129 | { |
130 | - $path = $this->getRecordLocation() . $this->recordFileName; |
|
130 | + $path = $this->getRecordLocation().$this->recordFileName; |
|
131 | 131 | $path = str_replace("\\", "/", $path); |
132 | 132 | return $path; |
133 | 133 | } |
@@ -23,12 +23,12 @@ |
||
23 | 23 | //should have your own way to get it, but just for the sake of example I'm going to show you a way to do that |
24 | 24 | |
25 | 25 | if (!$_SESSION['token'] && !isset($_GET)) { |
26 | - $redirect = $authorizationEndpoint . |
|
27 | - '?response_type=code' . |
|
28 | - '&client_id=' . urlencode($clientId) . |
|
29 | - '&redirect_uri=' . urlencode($redirectUri) . |
|
30 | - '&resource=' . urlencode($resource) . |
|
31 | - '&scope=' . urlencode('full_access_as_user'); |
|
26 | + $redirect = $authorizationEndpoint. |
|
27 | + '?response_type=code'. |
|
28 | + '&client_id='.urlencode($clientId). |
|
29 | + '&redirect_uri='.urlencode($redirectUri). |
|
30 | + '&resource='.urlencode($resource). |
|
31 | + '&scope='.urlencode('full_access_as_user'); |
|
32 | 32 | header("Location: {$redirect}"); |
33 | 33 | exit(); |
34 | 34 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | $api = API::withUsernameAndPassword('server', 'username', 'password'); |
6 | 6 | |
7 | -$api->createContacts(array ( |
|
7 | +$api->createContacts(array( |
|
8 | 8 | 'GivenName' => 'John', |
9 | 9 | 'Surname' => 'Smith', |
10 | 10 | 'EmailAddresses' => array( |
@@ -15,8 +15,8 @@ |
||
15 | 15 | //"EmailAddress:key" need to have the same structure as when we created the value |
16 | 16 | $api->updateContactItem($contact[0]->getItemId(), array( |
17 | 17 | 'GivenName' => 'Jane', |
18 | - 'EmailAddress:EmailAddress1' => array ( |
|
19 | - 'EmailAddresses' => array ( |
|
18 | + 'EmailAddress:EmailAddress1' => array( |
|
19 | + 'EmailAddresses' => array( |
|
20 | 20 | 'Entry' => array('Key' => 'EmailAddress1', '_value' => '[email protected]') |
21 | 21 | ) |
22 | 22 | ) |