Completed
Push — master ( 17eb68...7cf98d )
by Gareth
21s
created
src/Caster.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -70,36 +70,36 @@
 block discarded – undo
70 70
     {
71 71
         return [
72 72
             'DateTime' => [
73
-                'string' => function ($value) {
73
+                'string' => function($value) {
74 74
                     return new \DateTime($value);
75 75
                 }
76 76
             ],
77 77
             'dateTime' => [
78
-                'string' => function ($value) {
78
+                'string' => function($value) {
79 79
                     return new \DateTime($value);
80 80
                 }
81 81
             ],
82 82
             'date' => [
83
-                'string' => function ($value) {
83
+                'string' => function($value) {
84 84
                     return new \DateTime($value);
85 85
                 }
86 86
             ],
87 87
             'time' => [
88
-                'string' => function ($value) {
88
+                'string' => function($value) {
89 89
                     return new \DateTime($value);
90 90
                 }
91 91
             ],
92 92
             'ExchangeFormat' => [
93
-                'DateTime' => function ($value) {
93
+                'DateTime' => function($value) {
94 94
                     return $value->format('c');
95 95
                 },
96
-                'dateTime' => function ($value) {
96
+                'dateTime' => function($value) {
97 97
                     return $value->format('c');
98 98
                 },
99
-                'date' => function ($value) {
99
+                'date' => function($value) {
100 100
                     return $value->format('Y-m-d');
101 101
                 },
102
-                'time' => function ($value) {
102
+                'time' => function($value) {
103 103
                     return $value->format('H:i:s');
104 104
                 }
105 105
             ]
Please login to merge, or discard this patch.
src/API/NTLMSoapClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
             $headers[] = $this->ewsHeaders['timezone'];
115 115
         }
116 116
 
117
-        $headers = array_filter($headers, function ($header) {
117
+        $headers = array_filter($headers, function($header) {
118 118
             if (!($header instanceof SoapHeader)) {
119 119
                 return false;
120 120
             }
Please login to merge, or discard this patch.
src/API/MagicMethodsTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
     }
138 138
 
139 139
     /**
140
-     * @param $name
140
+     * @param string $name
141 141
      * @param $value
142 142
      * @return null
143 143
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             }
116 116
         }
117 117
 
118
-        throw new \Exception('Property ' . $names[0] . ' does not exist');
118
+        throw new \Exception('Property '.$names[0].' does not exist');
119 119
     }
120 120
 
121 121
     /**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         }
131 131
 
132 132
         if (!$this->exists($name)) {
133
-            throw new \Exception('Property ' . $name . ' does not exist');
133
+            throw new \Exception('Property '.$name.' does not exist');
134 134
         }
135 135
 
136 136
         return $name;
Please login to merge, or discard this patch.
src/API/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
         }
126 126
 
127 127
         if (is_array($property)) {
128
-            $property = array_map(function ($property) {
128
+            $property = array_map(function($property) {
129 129
                 if ($property instanceof Type) {
130 130
                     return $property->toXmlObject();
131 131
                 }
Please login to merge, or discard this patch.
src/CalendarAPI.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
     /**
101 101
      * Get a list of calendar items between two dates/times
102 102
      *
103
-     * @param string|DateTime $start
104
-     * @param string|DateTime $end
103
+     * @param string $start
104
+     * @param string $end
105 105
      * @param array $options
106
-     * @return CalendarItemType[]|Type\FindItemParentType
106
+     * @return Type
107 107
      */
108 108
     public function getCalendarItems($start = '12:00 AM', $end = '11:59 PM', $options = array())
109 109
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     /**
143 143
      * @param $id
144 144
      * @param $changeKey
145
-     * @return Type\CalendarItemType
145
+     * @return Type
146 146
      */
147 147
     public function getCalendarItem($id, $changeKey)
148 148
     {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      *
211 211
      * @param null $syncState
212 212
      * @param array $options
213
-     * @return API\Message\SyncFolderItemsResponseMessageType
213
+     * @return Type
214 214
      */
215 215
     public function listChanges($syncState = null, $options = array())
216 216
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace garethp\ews;
4 4
 
5
-use garethp\ews\API\Enumeration\DisposalType;
6 5
 use garethp\ews\API\Type\CalendarItemType;
7 6
 use garethp\ews\API\Type;
8 7
 use garethp\ews\API;
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
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
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
     {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     /**
64 64
      * @param Type\ItemIdType $itemId
65
-     * @return Type\ContactItemType
65
+     * @return Type
66 66
      */
67 67
     public function getContact($itemId)
68 68
     {
Please login to merge, or discard this patch.
src/API/ExchangeWebServices.php 2 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,
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         $this->soap = new NTLMSoapClient(
271 271
             $location,
272 272
             $auth,
273
-            dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl',
273
+            dirname(__FILE__).'/../../Resources/wsdl/services.wsdl',
274 274
             $options
275 275
         );
276 276
         libxml_disable_entity_loader($backup);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
         $server = $url['host'];
331 331
         if (isset($url['port'])) {
332
-            $server .= ':' . $url['port'];
332
+            $server .= ':'.$url['port'];
333 333
         }
334 334
 
335 335
         if (isset($url['path'])) {
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
         }
450 450
 
451 451
         if ($code >= 300) {
452
-            throw new ExchangeException('SOAP client returned status of ' . $code, $code);
452
+            throw new ExchangeException('SOAP client returned status of '.$code, $code);
453 453
         }
454 454
 
455 455
         if (empty($response) || empty($response->getNonNullResponseMessages())) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         $newStack = [];
492 492
         foreach ($middlewareStack as $key => $current) {
493 493
             /** @var $current callable */
494
-            $last = function () {
494
+            $last = function() {
495 495
             };
496 496
 
497 497
             if ($key != 0) {
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
             }
500 500
 
501 501
             $current = Closure::bind($current, $this, $this);
502
-            $newStack[] = function (MiddlewareRequest $request) use ($current, $last) {
502
+            $newStack[] = function(MiddlewareRequest $request) use ($current, $last) {
503 503
                 return $current($request, $last);
504 504
             };
505 505
         }
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   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,6 +93,10 @@  discard block
 block discarded – undo
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(
@@ -307,7 +311,7 @@  discard block
 block discarded – undo
307 311
 
308 312
     /**
309 313
      * @param $identifier
310
-     * @return Type\BaseFolderType
314
+     * @return Type
311 315
      */
312 316
     public function getFolder($identifier)
313 317
     {
@@ -328,7 +332,7 @@  discard block
 block discarded – undo
328 332
      * Get a folder by it's distinguishedId
329 333
      *
330 334
      * @param string $distinguishedId
331
-     * @return Type\BaseFolderType
335
+     * @return Type
332 336
      */
333 337
     public function getFolderByDistinguishedId($distinguishedId)
334 338
     {
@@ -342,7 +346,7 @@  discard block
 block discarded – undo
342 346
 
343 347
     /**
344 348
      * @param $folderId
345
-     * @return Type\BaseFolderType
349
+     * @return Type
346 350
      */
347 351
     public function getFolderByFolderId($folderId)
348 352
     {
@@ -354,7 +358,7 @@  discard block
 block discarded – undo
354 358
     /**
355 359
      * @param string|Type\FolderIdType $parentFolderId
356 360
      * @param array $options
357
-     * @return Type\BaseFolderType[]
361
+     * @return Type
358 362
      */
359 363
     public function getChildrenFolders($parentFolderId = 'root', $options = array())
360 364
     {
@@ -426,7 +430,7 @@  discard block
 block discarded – undo
426 430
      * @param Type\FolderIdType $folderId
427 431
      * @param null $syncState
428 432
      * @param array $options
429
-     * @return SyncFolderItemsResponseMessageType
433
+     * @return Type
430 434
      */
431 435
     public function listItemChanges($folderId, $syncState = null, $options = array())
432 436
     {
@@ -525,7 +529,7 @@  discard block
 block discarded – undo
525 529
      * @param string $deleteType
526 530
      * @param bool $deleteSubFolders
527 531
      * @param array $options
528
-     * @return EmptyFolderResponseType
532
+     * @return Type
529 533
      */
530 534
     public function emptyFolder(
531 535
         Type\FolderIdType $folderId,
Please login to merge, or discard this patch.