Completed
Push — master ( 543fa7...132976 )
by Gareth
02:43
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/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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
     protected function createClient($server, $auth, $options)
254 254
     {
255
-        $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx';
255
+        $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx';
256 256
 
257 257
         $options = array_replace_recursive([
258 258
             '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
         libxml_disable_entity_loader($backup);
@@ -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'])) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         }
387 387
 
388 388
         if (is_array($items) && isset($items[1]) && $items[1] instanceof Message\ResponseMessageType) {
389
-            return array_map(function ($responseItem) {
389
+            return array_map(function($responseItem) {
390 390
                 return $this->drillDownResponseLevels($responseItem);
391 391
             }, $items);
392 392
         }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
         }
442 442
 
443 443
         if ($code >= 300) {
444
-            throw new ExchangeException('SOAP client returned status of ' . $code, $code);
444
+            throw new ExchangeException('SOAP client returned status of '.$code, $code);
445 445
         }
446 446
 
447 447
         if (empty($response) || empty($response->getNonNullResponseMessages())) {
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
         $newStack = [];
484 484
         foreach ($middlewareStack as $key => $current) {
485 485
             /** @var $current callable */
486
-            $last = function () {
486
+            $last = function() {
487 487
             };
488 488
 
489 489
             if ($key != 0) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
             }
492 492
 
493 493
             $current = Closure::bind($current, $this, $this);
494
-            $newStack[] = function (MiddlewareRequest $request) use ($current, $last) {
494
+            $newStack[] = function(MiddlewareRequest $request) use ($current, $last) {
495 495
                 return $current($request, $last);
496 496
             };
497 497
         }
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.
examples/mail/sendMailWithAttachments.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 $mailId = $return = $api->sendMail($message, array('MessageDisposition' => 'SaveOnly'));
20 20
 
21 21
 //Create our Attachments
22
-$api->getClient()->CreateAttachment(array (
22
+$api->getClient()->CreateAttachment(array(
23 23
     'ParentItemId' => $mailId->toArray(),
24
-    'Attachments' => array (
25
-        'FileAttachment' => array (
24
+    'Attachments' => array(
25
+        'FileAttachment' => array(
26 26
             'Name' => 'picture.jpg',
27 27
             'Content' => file_get_contents('picture.jpg')
28 28
         )
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 $mailId = $api->getItem($mailId)->getItemId();
36 36
 
37 37
 //Send the message
38
-$api->getClient()->SendItem(array (
38
+$api->getClient()->SendItem(array(
39 39
     'SaveItemToFolder' => true,
40
-    'ItemIds' => array (
40
+    'ItemIds' => array(
41 41
         'ItemId' => $mailId->toArray()
42 42
     )
43 43
 ));
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
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
     /**
200 200
      * @param array $options
201
-     * @return API\Message\EmptyFolderResponseType
201
+     * @return Type
202 202
      */
203 203
     public function emptyTrash(array $options = [])
204 204
     {
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.
examples/basic/authenticatingWithOAuth.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 block discarded – undo
23 23
 //should have your own way to get it, but just for the sake of example I'm going to show you a way to do that
24 24
 
25 25
 if (!$_SESSION['token'] && !isset($_GET)) {
26
-    $redirect = $authorizationEndpoint .
27
-        '?response_type=code' .
28
-        '&client_id=' . urlencode($clientId) .
29
-        '&redirect_uri=' . urlencode($redirectUri) .
30
-        '&resource=' . urlencode($resource) .
31
-        '&scope=' . urlencode('full_access_as_user');
26
+    $redirect = $authorizationEndpoint.
27
+        '?response_type=code'.
28
+        '&client_id='.urlencode($clientId).
29
+        '&redirect_uri='.urlencode($redirectUri).
30
+        '&resource='.urlencode($resource).
31
+        '&scope='.urlencode('full_access_as_user');
32 32
     header("Location: {$redirect}");
33 33
     exit();
34 34
 } //Once you have your code, you can exchange it for a token. The code can only be used once, so you don't store the code.
Please login to merge, or discard this patch.