Completed
Pull Request — master (#66)
by marijn
03:01
created
src/API/ExchangeWebServices.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
     /**
429 429
      * @param Message\BaseResponseMessageType $response
430
-     * @param $code
430
+     * @param integer $code
431 431
      * @throws ExchangeException
432 432
      * @throws NoResponseReturnedException
433 433
      * @throws ServiceUnavailableException
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
     }
478 478
 
479 479
     /**
480
-     * @param array $middlewareStack
480
+     * @param callable[] $middlewareStack
481 481
      * @param MiddlewareRequest $request
482 482
      * @return MiddlewareResponse
483 483
      */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
     protected function createClient($server, $auth, $options)
255 255
     {
256
-        $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx';
256
+        $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx';
257 257
 
258 258
         $options = array_replace_recursive([
259 259
             'version' => self::VERSION_2007,
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $this->soap = new NTLMSoapClient(
270 270
             $location,
271 271
             $auth,
272
-            dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl',
272
+            dirname(__FILE__).'/../../Resources/wsdl/services.wsdl',
273 273
             $options
274 274
         );
275 275
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
         $server = $url['host'];
329 329
         if (isset($url['port'])) {
330
-            $server .= ':' . $url['port'];
330
+            $server .= ':'.$url['port'];
331 331
         }
332 332
 
333 333
         if (isset($url['path'])) {
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
         }
445 445
 
446 446
         if ($code >= 300) {
447
-            throw new ExchangeException('SOAP client returned status of ' . $code, $code);
447
+            throw new ExchangeException('SOAP client returned status of '.$code, $code);
448 448
         }
449 449
 
450 450
         if (empty($response) || empty($response->getNonNullResponseMessages())) {
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
         $newStack = [];
487 487
         foreach ($middlewareStack as $key => $current) {
488 488
             /** @var $current callable */
489
-            $last = function () {
489
+            $last = function() {
490 490
             };
491 491
 
492 492
             if ($key != 0) {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
             }
495 495
 
496 496
             $current = Closure::bind($current, $this, $this);
497
-            $newStack[] = function (MiddlewareRequest $request) use ($current, $last) {
497
+            $newStack[] = function(MiddlewareRequest $request) use ($current, $last) {
498 498
                 return $current($request, $last);
499 499
             };
500 500
         }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,14 +266,14 @@
 block discarded – undo
266 266
         $this->server = $server;
267 267
         $this->version = $options['version'];
268 268
 
269
-	    $backup = libxml_disable_entity_loader(false);
269
+     $backup = libxml_disable_entity_loader(false);
270 270
         $this->soap = new NTLMSoapClient(
271 271
             $location,
272 272
             $auth,
273 273
             dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl',
274 274
             $options
275 275
         );
276
-	    libxml_disable_entity_loader($backup);
276
+     libxml_disable_entity_loader($backup);
277 277
 
278 278
         if (isset($options['primarySmtpEmailAddress'])) {
279 279
             $this->setPrimarySmtpEmailAddress($options['primarySmtpEmailAddress']);
Please login to merge, or discard this patch.
src/API/ItemUpdateBuilder.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -24,6 +24,9 @@  discard block
 block discarded – undo
24 24
         return $updateArray;
25 25
     }
26 26
 
27
+    /**
28
+     * @param string $uriType
29
+     */
27 30
     protected static function buildUpdateDeleteItemFields($uriType, $changes)
28 31
     {
29 32
         $deleteItemFields = [];
@@ -40,6 +43,10 @@  discard block
 block discarded – undo
40 43
         return $deleteItemFields;
41 44
     }
42 45
 
46
+    /**
47
+     * @param string $itemType
48
+     * @param string $uriType
49
+     */
43 50
     protected static function buildUpdateSetItemFields($itemType, $uriType, $changes)
44 51
     {
45 52
         $setItemFields = [];
Please login to merge, or discard this patch.
src/API.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             $names = array($names);
187 187
         }
188 188
 
189
-        $names = array_map(function ($name) {
189
+        $names = array_map(function($name) {
190 190
             return array(
191 191
                 'DisplayName' => $name,
192 192
                 'FolderClass' => 'IPF.Appointment'
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             $names = array($names);
211 211
         }
212 212
 
213
-        $names = array_map(function ($name) {
213
+        $names = array_map(function($name) {
214 214
             return ['DisplayName' => $name];
215 215
         }, $names);
216 216
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             $folders = array($folders);
248 248
         }
249 249
 
250
-        $folderIds = array_map(function ($folderId) {
250
+        $folderIds = array_map(function($folderId) {
251 251
             return $folderId->toArray();
252 252
         }, $folders);
253 253
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $items = array($items);
286 286
         }
287 287
 
288
-        $items = array_map(function ($item) {
288
+        $items = array_map(function($item) {
289 289
             $item = Type\ItemIdType::buildFromArray($item);
290 290
 
291 291
             return $item->toArray();
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,6 +92,10 @@  discard block
 block discarded – undo
92 92
         return $this->client;
93 93
     }
94 94
 
95
+    /**
96
+     * @param string $username
97
+     * @param string $password
98
+     */
95 99
     public static function withUsernameAndPassword($server, $username, $password, $options = [])
96 100
     {
97 101
         return new static(ExchangeWebServices::fromUsernameAndPassword(
@@ -306,7 +310,7 @@  discard block
 block discarded – undo
306 310
 
307 311
     /**
308 312
      * @param $identifier
309
-     * @return Type\BaseFolderType
313
+     * @return Type
310 314
      */
311 315
     public function getFolder($identifier)
312 316
     {
@@ -327,7 +331,7 @@  discard block
 block discarded – undo
327 331
      * Get a folder by it's distinguishedId
328 332
      *
329 333
      * @param string $distinguishedId
330
-     * @return Type\BaseFolderType
334
+     * @return Type
331 335
      */
332 336
     public function getFolderByDistinguishedId($distinguishedId)
333 337
     {
@@ -341,7 +345,7 @@  discard block
 block discarded – undo
341 345
 
342 346
     /**
343 347
      * @param $folderId
344
-     * @return Type\BaseFolderType
348
+     * @return Type
345 349
      */
346 350
     public function getFolderByFolderId($folderId)
347 351
     {
@@ -353,7 +357,7 @@  discard block
 block discarded – undo
353 357
     /**
354 358
      * @param string|Type\FolderIdType $parentFolderId
355 359
      * @param array $options
356
-     * @return Type\BaseFolderType[]
360
+     * @return Type
357 361
      */
358 362
     public function getChildrenFolders($parentFolderId = 'root', $options = array())
359 363
     {
@@ -425,7 +429,7 @@  discard block
 block discarded – undo
425 429
      * @param Type\FolderIdType $folderId
426 430
      * @param null $syncState
427 431
      * @param array $options
428
-     * @return SyncFolderItemsResponseMessageType
432
+     * @return Type
429 433
      */
430 434
     public function listItemChanges($folderId, $syncState = null, $options = array())
431 435
     {
Please login to merge, or discard this patch.