@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | protected function createClient($server, $auth, $options) |
| 213 | 213 | { |
| 214 | - $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx'; |
|
| 214 | + $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx'; |
|
| 215 | 215 | |
| 216 | 216 | $options = array_replace_recursive([ |
| 217 | 217 | 'version' => self::VERSION_2007, |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | $this->soap = new NTLMSoapClient( |
| 225 | 225 | $location, |
| 226 | 226 | $auth, |
| 227 | - dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl', |
|
| 227 | + dirname(__FILE__).'/../../Resources/wsdl/services.wsdl', |
|
| 228 | 228 | $options |
| 229 | 229 | ); |
| 230 | 230 | |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | $server = $url['host']; |
| 295 | 295 | if (isset($url['port'])) { |
| 296 | - $server .= ':' . $url['port']; |
|
| 296 | + $server .= ':'.$url['port']; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if (isset($url['path'])) { |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | // If the soap call failed then we need to thow an exception. |
| 320 | 320 | $code = $this->getClient()->getResponseCode(); |
| 321 | 321 | if ($code != 200) { |
| 322 | - throw new Exception('SOAP client returned status of ' . $code, $code); |
|
| 322 | + throw new Exception('SOAP client returned status of '.$code, $code); |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | if (empty($response) || |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | trait MagicMethodsTrait |
| 14 | 14 | { |
| 15 | - protected $_typeMap = [ ]; |
|
| 15 | + protected $_typeMap = []; |
|
| 16 | 16 | |
| 17 | 17 | public function __call($name, $arguments) |
| 18 | 18 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (!$this->exists($name)) { |
| 63 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 63 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return $this->$name; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (!$this->exists($name)) { |
| 76 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 76 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | if (isset($this->_typeMap[$name])) { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if (!$this->exists($name)) { |
| 95 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 95 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (isset($this->_typeMap[$name])) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (!$this->exists($name)) { |
| 127 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 127 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return ((bool) $this->$name); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | return array( |
| 12 | 12 | 'curl' => array( |
| 13 | 13 | CURLOPT_HTTPAUTH => CURLAUTH_BASIC | CURLAUTH_NTLM, |
| 14 | - CURLOPT_USERPWD => $username . ':' . $password |
|
| 14 | + CURLOPT_USERPWD => $username.':'.$password |
|
| 15 | 15 | ) |
| 16 | 16 | ); |
| 17 | 17 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | return array( |
| 22 | 22 | 'headers' => array( |
| 23 | - 'Authorization' => 'Bearer ' . $token |
|
| 23 | + 'Authorization' => 'Bearer '.$token |
|
| 24 | 24 | ) |
| 25 | 25 | ); |
| 26 | 26 | } |
@@ -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 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * @param Type\FolderIdType $folderId |
| 37 | 37 | * @param array $options |
| 38 | - * @return Type\ContactItemType[] |
|
| 38 | + * @return Type |
|
| 39 | 39 | */ |
| 40 | 40 | public function getContacts($folderId = null, $options = array()) |
| 41 | 41 | { |
@@ -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 | ) |