@@ -90,10 +90,8 @@ |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @param mixed $location |
|
94 | - * @param string $user |
|
95 | - * @param string $password |
|
96 | - * @param $wsdl |
|
93 | + * @param string $location |
|
94 | + * @param string $wsdl |
|
97 | 95 | * @param array $options |
98 | 96 | */ |
99 | 97 | public function __construct($location, $auth, $wsdl, $options = array()) |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $args[0] = $args[0]->toXmlObject(); |
100 | 100 | } |
101 | 101 | |
102 | - $this->__default_headers = array ( |
|
102 | + $this->__default_headers = array( |
|
103 | 103 | $this->ewsHeaders['version'], |
104 | 104 | $this->ewsHeaders['impersonation'] |
105 | 105 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if (!empty($options['version'])) { |
137 | 137 | $this->ewsHeaders['version'] = new SoapHeader( |
138 | 138 | 'http://schemas.microsoft.com/exchange/services/2006/types', |
139 | - 'RequestServerVersion Version="' . $options['version'] . '"' |
|
139 | + 'RequestServerVersion Version="'.$options['version'].'"' |
|
140 | 140 | ); |
141 | 141 | } |
142 | 142 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public function __getLastRequestHeaders() |
219 | 219 | { |
220 | - return implode('n', $this->__last_request_headers) . "\n"; |
|
220 | + return implode('n', $this->__last_request_headers)."\n"; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $server, |
155 | 155 | $username, |
156 | 156 | $password, |
157 | - $options = [ ] |
|
157 | + $options = [] |
|
158 | 158 | ) { |
159 | 159 | $this->setClient(ExchangeWebServices::fromUsernameAndPassword( |
160 | 160 | $server, |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | )); |
165 | 165 | } |
166 | 166 | |
167 | - public static function withUsernameAndPassword($server, $username, $password, $options = [ ]) |
|
167 | + public static function withUsernameAndPassword($server, $username, $password, $options = []) |
|
168 | 168 | { |
169 | 169 | return new static(ExchangeWebServices::fromUsernameAndPassword( |
170 | 170 | $server, |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | )); |
175 | 175 | } |
176 | 176 | |
177 | - public static function withCallbackToken($server, $token, $options = [ ]) |
|
177 | + public static function withCallbackToken($server, $token, $options = []) |
|
178 | 178 | { |
179 | 179 | return new static(ExchangeWebServices::fromCallbackToken( |
180 | 180 | $server, |
@@ -110,6 +110,9 @@ discard block |
||
110 | 110 | return $this->unIndexedFieldUris[$fieldName][$preference]; |
111 | 111 | } |
112 | 112 | |
113 | + /** |
|
114 | + * @param string $fieldName |
|
115 | + */ |
|
113 | 116 | public function getIndexedFieldUriByName($fieldName, $preference = 'item') |
114 | 117 | { |
115 | 118 | $fieldName = strtolower($fieldName); |
@@ -248,7 +251,7 @@ discard block |
||
248 | 251 | * |
249 | 252 | * @param $items |
250 | 253 | * @param array $options |
251 | - * @return API\CreateItemResponseType |
|
254 | + * @return Type |
|
252 | 255 | */ |
253 | 256 | public function createItems($items, $options = array()) |
254 | 257 | { |
@@ -283,6 +286,10 @@ discard block |
||
283 | 286 | return $this->getClient()->UpdateItem($request)->getItems(); |
284 | 287 | } |
285 | 288 | |
289 | + /** |
|
290 | + * @param string $itemType |
|
291 | + * @param string $uriType |
|
292 | + */ |
|
286 | 293 | protected function buildUpdateItemChanges($itemType, $uriType, $changes) |
287 | 294 | { |
288 | 295 | $setItemFields = array(); |
@@ -404,7 +411,7 @@ discard block |
||
404 | 411 | |
405 | 412 | /** |
406 | 413 | * @param $identifier |
407 | - * @return Type\BaseFolderType |
|
414 | + * @return Type |
|
408 | 415 | */ |
409 | 416 | public function getFolder($identifier) |
410 | 417 | { |
@@ -424,7 +431,7 @@ discard block |
||
424 | 431 | * Get a folder by it's distinguishedId |
425 | 432 | * |
426 | 433 | * @param string $distinguishedId |
427 | - * @return Type\BaseFolderType |
|
434 | + * @return Type |
|
428 | 435 | */ |
429 | 436 | public function getFolderByDistinguishedId($distinguishedId) |
430 | 437 | { |
@@ -438,7 +445,7 @@ discard block |
||
438 | 445 | |
439 | 446 | /** |
440 | 447 | * @param $folderId |
441 | - * @return Type\BaseFolderType |
|
448 | + * @return Type |
|
442 | 449 | */ |
443 | 450 | public function getFolderByFolderId($folderId) |
444 | 451 | { |
@@ -478,7 +485,7 @@ discard block |
||
478 | 485 | } |
479 | 486 | |
480 | 487 | /** |
481 | - * @param $folderName |
|
488 | + * @param string $folderName |
|
482 | 489 | * @param string|Type\FolderIdType $parentFolderId |
483 | 490 | * @param array $options |
484 | 491 | * @return bool|Type\BaseFolderType |
@@ -523,7 +530,7 @@ discard block |
||
523 | 530 | * @param Type\FolderIdType $folderId |
524 | 531 | * @param null $syncState |
525 | 532 | * @param array $options |
526 | - * @return SyncFolderItemsResponseMessageType |
|
533 | + * @return Type |
|
527 | 534 | */ |
528 | 535 | public function listItemChanges($folderId, $syncState = null, $options = array()) |
529 | 536 | { |
@@ -2319,7 +2319,7 @@ |
||
2319 | 2319 | * |
2320 | 2320 | * @var string |
2321 | 2321 | */ |
2322 | - const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
2322 | + const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
2323 | 2323 | |
2324 | 2324 | /** |
2325 | 2325 | * This error occurs if the routing type that is passed for an |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | public static function arrayIsAssoc($array) |
124 | 124 | { |
125 | - return (bool)count(array_filter(array_keys($array), 'is_string')); |
|
125 | + return (bool) count(array_filter(array_keys($array), 'is_string')); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -162,6 +162,6 @@ discard block |
||
162 | 162 | return ''; |
163 | 163 | } |
164 | 164 | |
165 | - return (string)$this->_; |
|
165 | + return (string) $this->_; |
|
166 | 166 | } |
167 | 167 | } |
@@ -70,36 +70,36 @@ |
||
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 | ] |
@@ -196,7 +196,7 @@ |
||
196 | 196 | |
197 | 197 | public function getAttachment(Type\AttachmentIdType $attachmentId) |
198 | 198 | { |
199 | - $request = array ( |
|
199 | + $request = array( |
|
200 | 200 | 'AttachmentIds' => array( |
201 | 201 | $attachmentId->toXmlObject() |
202 | 202 | ) |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @param Type\FolderIdType |
76 | 76 | * @param array $options |
77 | - * @return Type\MessageType[] |
|
77 | + * @return Type |
|
78 | 78 | */ |
79 | 79 | public function getMailItems($folderId = null, $options = array()) |
80 | 80 | { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | /** |
106 | 106 | * @param Type\FolderIdType $folderId |
107 | 107 | * @param array $options |
108 | - * @return Type\MessageType[] |
|
108 | + * @return Type |
|
109 | 109 | */ |
110 | 110 | public function getUnreadMailItems($folderId = null, $options = array()) |
111 | 111 | { |
@@ -100,10 +100,10 @@ discard block |
||
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 |
||
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 |
||
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 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @param string $sensitivity |
224 | 224 | * @param array $options |
225 | 225 | * |
226 | - * @return Type\ItemIdType[] |
|
226 | + * @return Type |
|
227 | 227 | */ |
228 | 228 | public function acceptMeeting($itemId, $message, $sensitivity = 'Private', $options = array()) |
229 | 229 | { |
@@ -1,11 +1,11 @@ |
||
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 jamesiarmes\PEWS\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); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | protected function createClient($server, $auth, $options) |
213 | 213 | { |
214 | - $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx'; |
|
214 | + $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx'; |
|
215 | 215 | |
216 | 216 | $options = array_replace_recursive([ |
217 | 217 | 'version' => self::VERSION_2007, |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $this->soap = new NTLMSoapClient( |
225 | 225 | $location, |
226 | 226 | $auth, |
227 | - dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl', |
|
227 | + dirname(__FILE__).'/../../Resources/wsdl/services.wsdl', |
|
228 | 228 | $options |
229 | 229 | ); |
230 | 230 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | |
294 | 294 | $server = $url['host']; |
295 | 295 | if (isset($url['port'])) { |
296 | - $server .= ':' . $url['port']; |
|
296 | + $server .= ':'.$url['port']; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | if (isset($url['path'])) { |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | // If the soap call failed then we need to thow an exception. |
320 | 320 | $code = $this->getClient()->getResponseCode(); |
321 | 321 | if ($code != 200) { |
322 | - throw new Exception('SOAP client returned status of ' . $code, $code); |
|
322 | + throw new Exception('SOAP client returned status of '.$code, $code); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | if (empty($response) || |