Completed
Pull Request — master (#164)
by
unknown
54:31
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/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/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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
     protected function createClient($server, $auth, $options)
256 256
     {
257
-        $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx';
257
+        $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx';
258 258
 
259 259
         $options = array_replace_recursive([
260 260
             'version' => self::VERSION_2007,
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $this->soap = new NTLMSoapClient(
272 272
             $location,
273 273
             $auth,
274
-            dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl',
274
+            dirname(__FILE__).'/../../Resources/wsdl/services.wsdl',
275 275
             $options
276 276
         );
277 277
         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'])) {
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         }
389 389
 
390 390
         if (is_array($items) && isset($items[1]) && $items[1] instanceof Message\ResponseMessageType) {
391
-            return array_map(function ($responseItem) {
391
+            return array_map(function($responseItem) {
392 392
                 return self::drillDownResponseLevels($responseItem);
393 393
             }, $items);
394 394
         }
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         }
444 444
 
445 445
         if ($code >= 300) {
446
-            throw new ExchangeException('SOAP client returned status of ' . $code, $code);
446
+            throw new ExchangeException('SOAP client returned status of '.$code, $code);
447 447
         }
448 448
 
449 449
         if (empty($response) || empty($response->getNonNullResponseMessages())) {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         $newStack = [];
486 486
         foreach ($middlewareStack as $key => $current) {
487 487
             /** @var $current callable */
488
-            $last = function () {
488
+            $last = function() {
489 489
             };
490 490
 
491 491
             if ($key != 0) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
             }
494 494
 
495 495
             $current = Closure::bind($current, $this, $this);
496
-            $newStack[] = function (MiddlewareRequest $request) use ($current, $last) {
496
+            $newStack[] = function(MiddlewareRequest $request) use ($current, $last) {
497 497
                 return $current($request, $last);
498 498
             };
499 499
         }
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.
bin/generateModels.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(__DIR__ . "/../vendor/autoload.php");
3
+require_once(__DIR__."/../vendor/autoload.php");
4 4
 
5 5
 use Symfony\Component\Console\Application;
6 6
 use garethp\ews\Generator\ConvertToPHP;
7 7
 
8
-error_reporting(error_reporting() &~E_NOTICE);
8
+error_reporting(error_reporting() & ~E_NOTICE);
9 9
 
10 10
 $cli = new Application('Convert XSD to PHP classes Command Line Interface', "2.0");
11 11
 $cli->setCatchExceptions(true);
Please login to merge, or discard this patch.
src/API/ExchangeWebServices/MiddlewareFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function getSoapCall()
15 15
     {
16
-        return function (MiddlewareRequest $request) {
16
+        return function(MiddlewareRequest $request) {
17 17
             $client = $this->getClient();
18 18
             $response = $client->__call($request->getName(), $request->getArguments());
19 19
             $response = MiddlewareResponse::newResponse($response);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function getTypeToXMLObject()
26 26
     {
27
-        return function (MiddlewareRequest $request, callable $next) {
27
+        return function(MiddlewareRequest $request, callable $next) {
28 28
             if ($request->getRequest() instanceof Type) {
29 29
                 $request->setRequest($request->getRequest()->toXmlObject());
30 30
             }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function getStripSyncScopeForExchange2007()
37 37
     {
38
-        return function (MiddlewareRequest $request, callable $next) {
38
+        return function(MiddlewareRequest $request, callable $next) {
39 39
             $requestObj = $request->getRequest();
40 40
 
41 41
             if ($request->getName() == "SyncFolderItems"
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function getProcessResponse()
53 53
     {
54
-        return function (MiddlewareRequest $request, callable $next) {
54
+        return function(MiddlewareRequest $request, callable $next) {
55 55
             $response = $next($request);
56 56
 
57 57
             $response->setResponse($this->processResponse($response->getResponse()));
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function getAddLastRequestToPagedResults()
64 64
     {
65
-        return function (MiddlewareRequest $request, callable $next) {
65
+        return function(MiddlewareRequest $request, callable $next) {
66 66
             $response = $next($request);
67 67
 
68 68
             $responseObject = $response->getResponse();
Please login to merge, or discard this patch.
src/API/FieldURIManager.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -91,6 +91,9 @@
 block discarded – undo
91 91
         return self::$unIndexedFieldURIs[$fieldName][$preference];
92 92
     }
93 93
 
94
+    /**
95
+     * @param string $fieldName
96
+     */
94 97
     public static function getIndexedFieldUriByName($fieldName, $preference = 'item', $entryKey = false)
95 98
     {
96 99
         self::setupFieldUris();
Please login to merge, or discard this patch.
src/CalendarAPI.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             ],
307 307
         ];
308 308
 
309
-        $users = array_map(function ($user) {
309
+        $users = array_map(function($user) {
310 310
             return [
311 311
                 'Email' => ['Address' => $user],
312 312
                 'AttendeeType' => 'Required',
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             ]]);
339 339
         $availability = $this->getAvailabilityFor($startTime, $endTime, $users, $options);
340 340
 
341
-        $availabilities = array_map(function (FreeBusyResponseType $freeBusyResponseType) {
341
+        $availabilities = array_map(function(FreeBusyResponseType $freeBusyResponseType) {
342 342
             return str_split($freeBusyResponseType->getFreeBusyView()->getMergedFreeBusy());
343 343
         }, $availability->getFreeBusyResponseArray()->FreeBusyResponse);
344 344
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * Get a list of calendar items between two dates/times
88 88
      *
89
-     * @param string|DateTime $start
90
-     * @param string|DateTime $end
89
+     * @param string $start
90
+     * @param string $end
91 91
      * @param array $options
92
-     * @return CalendarItemType[]|Type\FindItemParentType
92
+     * @return Type
93 93
      */
94 94
     public function getCalendarItems($start = '12:00 AM', $end = '11:59 PM', $options = array())
95 95
     {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param $id
123 123
      * @param $changeKey
124 124
      * @param array $options
125
-     * @return Type\CalendarItemType
125
+     * @return Type
126 126
      */
127 127
     public function getCalendarItem($id, $changeKey, $options = [])
128 128
     {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      *
190 190
      * @param null $syncState
191 191
      * @param array $options
192
-     * @return API\Message\SyncFolderItemsResponseMessageType
192
+     * @return Type
193 193
      */
194 194
     public function listChanges($syncState = null, $options = array())
195 195
     {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      * @param array $users
252 252
      * @param array $options
253 253
      *
254
-     * @return API\Message\GetUserAvailabilityResponseType
254
+     * @return Type
255 255
      */
256 256
     public function getAvailabilityFor($startTime, $endTime, array $users, array $options = array())
257 257
     {
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
@@ -110,7 +110,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.