@@ -110,7 +110,7 @@ |
||
| 110 | 110 | $headers[] = $this->ewsHeaders['timezone']; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - $headers = array_filter($headers, function ($header) { |
|
| 113 | + $headers = array_filter($headers, function($header) { |
|
| 114 | 114 | return $header instanceof SoapHeader; |
| 115 | 115 | }); |
| 116 | 116 | |
@@ -93,6 +93,10 @@ discard block |
||
| 93 | 93 | return $this->client; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $username |
|
| 98 | + * @param string $password |
|
| 99 | + */ |
|
| 96 | 100 | public static function withUsernameAndPassword($server, $username, $password, $options = []) |
| 97 | 101 | { |
| 98 | 102 | return new static(ExchangeWebServices::fromUsernameAndPassword( |
@@ -188,6 +192,9 @@ discard block |
||
| 188 | 192 | return $this->createFolders($names, $parentFolder, $options, 'IPF.Contact'); |
| 189 | 193 | } |
| 190 | 194 | |
| 195 | + /** |
|
| 196 | + * @param string $folderClass |
|
| 197 | + */ |
|
| 191 | 198 | public function createFolders($names, Type\FolderIdType $parentFolder, $options = array(), $folderClass = null) |
| 192 | 199 | { |
| 193 | 200 | $names = Utilities\ensureIsArray($names); |
@@ -282,7 +289,7 @@ discard block |
||
| 282 | 289 | |
| 283 | 290 | /** |
| 284 | 291 | * @param $identifier |
| 285 | - * @return Type\BaseFolderType |
|
| 292 | + * @return Type |
|
| 286 | 293 | */ |
| 287 | 294 | public function getFolder($identifier) |
| 288 | 295 | { |
@@ -303,7 +310,7 @@ discard block |
||
| 303 | 310 | * Get a folder by it's distinguishedId |
| 304 | 311 | * |
| 305 | 312 | * @param string $distinguishedId |
| 306 | - * @return Type\BaseFolderType |
|
| 313 | + * @return Type |
|
| 307 | 314 | */ |
| 308 | 315 | public function getFolderByDistinguishedId($distinguishedId) |
| 309 | 316 | { |
@@ -317,7 +324,7 @@ discard block |
||
| 317 | 324 | |
| 318 | 325 | /** |
| 319 | 326 | * @param $folderId |
| 320 | - * @return Type\BaseFolderType |
|
| 327 | + * @return Type |
|
| 321 | 328 | */ |
| 322 | 329 | public function getFolderByFolderId($folderId) |
| 323 | 330 | { |
@@ -329,7 +336,7 @@ discard block |
||
| 329 | 336 | /** |
| 330 | 337 | * @param string|Type\FolderIdType $parentFolderId |
| 331 | 338 | * @param array $options |
| 332 | - * @return Type\BaseFolderType[] |
|
| 339 | + * @return Type |
|
| 333 | 340 | */ |
| 334 | 341 | public function getChildrenFolders($parentFolderId = 'root', $options = array()) |
| 335 | 342 | { |
@@ -401,7 +408,7 @@ discard block |
||
| 401 | 408 | * @param Type\FolderIdType $folderId |
| 402 | 409 | * @param null $syncState |
| 403 | 410 | * @param array $options |
| 404 | - * @return SyncFolderItemsResponseMessageType |
|
| 411 | + * @return Type |
|
| 405 | 412 | */ |
| 406 | 413 | public function listItemChanges($folderId, $syncState = null, $options = array()) |
| 407 | 414 | { |
@@ -496,7 +503,7 @@ discard block |
||
| 496 | 503 | * @param string $deleteType |
| 497 | 504 | * @param bool $deleteSubFolders |
| 498 | 505 | * @param array $options |
| 499 | - * @return EmptyFolderResponseType |
|
| 506 | + * @return Type |
|
| 500 | 507 | */ |
| 501 | 508 | public function emptyFolder( |
| 502 | 509 | Type\FolderIdType $folderId, |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | public function createFolders($names, Type\FolderIdType $parentFolder, $options = array(), $folderClass = null) |
| 192 | 192 | { |
| 193 | 193 | $names = Utilities\ensureIsArray($names); |
| 194 | - $names = array_map(function ($name) use ($folderClass) { |
|
| 194 | + $names = array_map(function($name) use ($folderClass) { |
|
| 195 | 195 | return ['DisplayName' => $name, 'FolderClass' => $folderClass]; |
| 196 | 196 | }, $names); |
| 197 | 197 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | { |
| 226 | 226 | $folders = Utilities\ensureIsArray($folders); |
| 227 | 227 | |
| 228 | - $folderIds = array_map(function ($folderId) { |
|
| 228 | + $folderIds = array_map(function($folderId) { |
|
| 229 | 229 | return $folderId->toArray(); |
| 230 | 230 | }, $folders); |
| 231 | 231 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | { |
| 262 | 262 | $items = Utilities\ensureIsArray($items); |
| 263 | 263 | |
| 264 | - $items = array_map(function ($item) { |
|
| 264 | + $items = array_map(function($item) { |
|
| 265 | 265 | $item = Type\ItemIdType::buildFromArray($item); |
| 266 | 266 | |
| 267 | 267 | return $item->toArray(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | if (is_array($value)) { |
| 11 | - return array_map(function ($value) { |
|
| 11 | + return array_map(function($value) { |
|
| 12 | 12 | return cloneValue($value); |
| 13 | 13 | }, $value); |
| 14 | 14 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if (is_array($property)) { |
| 126 | - return array_map(function ($property) { |
|
| 126 | + return array_map(function($property) { |
|
| 127 | 127 | if ($property instanceof Type) { |
| 128 | 128 | return $property->toXmlObject(); |
| 129 | 129 | } |