Completed
Pull Request — master (#153)
by
unknown
07:31
created
src/API/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/API/ExchangeAutodiscover.php 2 patches
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -358,8 +358,8 @@  discard block
 block discarded – undo
358 358
     }
359 359
 
360 360
     /**
361
-     * @param $majorVersion
362
-     * @param $minorVersion
361
+     * @param string $majorVersion
362
+     * @param string $minorVersion
363 363
      * @return bool|mixed
364 364
      */
365 365
     protected function parseVersionBefore2013($majorVersion, $minorVersion)
@@ -387,6 +387,11 @@  discard block
 block discarded – undo
387 387
         return constant(ExchangeWebServices::class . "::$constant");
388 388
     }
389 389
 
390
+    /**
391
+     * @param string $majorVersion
392
+     * @param string $minorVersion
393
+     * @param string $buildVersion
394
+     */
390 395
     protected function parseVersionAfter2013($majorVersion, $minorVersion, $buildVersion)
391 396
     {
392 397
         if ($minorVersion >= 1) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@
 block discarded – undo
384 384
             $constant .= "_SP$minorVersion";
385 385
         }
386 386
 
387
-        return constant(ExchangeWebServices::class . "::$constant");
387
+        return constant(ExchangeWebServices::class."::$constant");
388 388
     }
389 389
 
390 390
     protected function parseVersionAfter2013($majorVersion, $minorVersion, $buildVersion)
Please login to merge, or discard this patch.
src/NotificationAPI.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     public static function handlePullNotification($uri, callable $handle, array $options = array())
10 10
     {
11 11
         $server = new \SoapServer(
12
-            __DIR__ . '/../Resources/wsdl/notification-service.wsdl',
12
+            __DIR__.'/../Resources/wsdl/notification-service.wsdl',
13 13
             [
14 14
                 'uri' => $uri,
15 15
                 'classmap' => ClassMap::getClassMap(),
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use garethp\ews\API\ClassMap;
6 6
 use garethp\ews\API\Type\BaseFolderIdType;
7
-use garethp\ews\API\Type\FolderIdType;
8 7
 
9 8
 class NotificationAPI extends API
10 9
 {
Please login to merge, or discard this patch.
src/Utilities/getFolderIds.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     $folders = ensureIsArray($folderIds);
10 10
 
11
-    $folderIds = array_map(function (BaseFolderIdType $folderId) {
11
+    $folderIds = array_map(function(BaseFolderIdType $folderId) {
12 12
         return $folderId->toArray(true);
13 13
     }, $folders);
14 14
 
15
-    return array_reduce($folderIds, function ($folderIds, $folderId) {
15
+    return array_reduce($folderIds, function($folderIds, $folderId) {
16 16
         $folderIds[key($folderId)][] = current($folderId);
17 17
         return $folderIds;
18 18
     }, []);
Please login to merge, or discard this patch.
src/API.php 2 patches
Doc Comments   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,6 +94,10 @@  discard block
 block discarded – undo
94 94
         return $this->client;
95 95
     }
96 96
 
97
+    /**
98
+     * @param string $username
99
+     * @param string $password
100
+     */
97 101
     public static function withUsernameAndPassword($server, $username, $password, $options = [])
98 102
     {
99 103
         return new static(ExchangeWebServices::fromUsernameAndPassword(
@@ -189,6 +193,9 @@  discard block
 block discarded – undo
189 193
         return $this->createFolders($names, $parentFolder, $options, 'IPF.Contact');
190 194
     }
191 195
 
196
+    /**
197
+     * @param string $folderClass
198
+     */
192 199
     public function createFolders($names, BaseFolderIdType $parentFolder, $options = array(), $folderClass = null)
193 200
     {
194 201
         $names = Utilities\ensureIsArray($names);
@@ -277,7 +284,7 @@  discard block
 block discarded – undo
277 284
 
278 285
     /**
279 286
      * @param $identifier
280
-     * @return Type\BaseFolderType
287
+     * @return Type
281 288
      */
282 289
     public function getFolder($identifier)
283 290
     {
@@ -298,7 +305,7 @@  discard block
 block discarded – undo
298 305
      * Get a folder by it's distinguishedId
299 306
      *
300 307
      * @param string $distinguishedId
301
-     * @return Type\BaseFolderType
308
+     * @return Type
302 309
      */
303 310
     public function getFolderByDistinguishedId($distinguishedId)
304 311
     {
@@ -312,7 +319,7 @@  discard block
 block discarded – undo
312 319
 
313 320
     /**
314 321
      * @param string|BaseFolderIdType $folderId
315
-     * @return Type\BaseFolderType
322
+     * @return Type
316 323
      */
317 324
     public function getFolderByFolderId($folderId)
318 325
     {
@@ -328,7 +335,7 @@  discard block
 block discarded – undo
328 335
     /**
329 336
      * @param string|BaseFolderIdType $parentFolderId
330 337
      * @param array $options
331
-     * @return Type\BaseFolderType[]
338
+     * @return Type
332 339
      */
333 340
     public function getChildrenFolders($parentFolderId = 'root', array $options = array())
334 341
     {
@@ -398,7 +405,7 @@  discard block
 block discarded – undo
398 405
      * @param BaseFolderIdType $folderId
399 406
      * @param null $syncState
400 407
      * @param array $options
401
-     * @return SyncFolderItemsResponseMessageType
408
+     * @return Type
402 409
      */
403 410
     public function listItemChanges($folderId, $syncState = null, array $options = array())
404 411
     {
@@ -493,7 +500,7 @@  discard block
 block discarded – undo
493 500
      * @param string $deleteType
494 501
      * @param bool $deleteSubFolders
495 502
      * @param array $options
496
-     * @return EmptyFolderResponseType
503
+     * @return Type
497 504
      */
498 505
     public function emptyFolder(
499 506
         BaseFolderIdType $folderId,
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     public function createFolders($names, BaseFolderIdType $parentFolder, $options = array(), $folderClass = null)
193 193
     {
194 194
         $names = Utilities\ensureIsArray($names);
195
-        $names = array_map(function ($name) use ($folderClass) {
195
+        $names = array_map(function($name) use ($folderClass) {
196 196
             return ['DisplayName' => $name, 'FolderClass' => $folderClass];
197 197
         }, $names);
198 198
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     {
257 257
         $items = Utilities\ensureIsArray($items, true);
258 258
 
259
-        $items = array_map(function ($item) {
259
+        $items = array_map(function($item) {
260 260
             $item = Type\ItemIdType::buildFromArray($item);
261 261
 
262 262
             return $item->toArray();
Please login to merge, or discard this patch.
src/ContactsAPI.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     /**
58 58
      * @param Type\BaseFolderIdType $folderId
59 59
      * @param array $options
60
-     * @return Type\ContactItemType[]
60
+     * @return Type
61 61
      */
62 62
     public function getContacts($folderId = null, $options = array())
63 63
     {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     /**
84 84
      * @param Type\ItemIdType $itemId
85
-     * @return Type\ContactItemType
85
+     * @return Type
86 86
      */
87 87
     public function getContact($itemId)
88 88
     {
Please login to merge, or discard this patch.
src/MailAPI.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @param Type\BaseFolderIdType $folderId
75 75
      * @param array $options
76
-     * @return Type\MessageType[]
76
+     * @return Type
77 77
      */
78 78
     public function getMailItems($folderId = null, $options = array())
79 79
     {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * @param Type\BaseFolderIdType $folderId
104 104
      * @param array $options
105
-     * @return Type\MessageType[]
105
+     * @return Type
106 106
      */
107 107
     public function getUnreadMailItems($folderId = null, $options = array())
108 108
     {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
     /**
196 196
      * @param array $options
197
-     * @return API\Message\EmptyFolderResponseType
197
+     * @return Type
198 198
      */
199 199
     public function emptyTrash(array $options = [])
200 200
     {
Please login to merge, or discard this patch.