Completed
Push — master ( 617cd0...5e87a2 )
by Gareth
08:23
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/Mail/MailAPI.php 1 patch
Doc Comments   +2 added lines, -2 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
     {
Please login to merge, or discard this patch.
src/Calendar/CalendarAPI.php 1 patch
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.
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 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);
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
 }
Please login to merge, or discard this patch.
src/Contacts/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/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.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace garethp\ews;
4 4
 
5
-use garethp\ews\API\Enumeration\DictionaryURIType;
6
-use garethp\ews\API\Enumeration\UnindexedFieldURIType;
7 5
 use garethp\ews\API\Exception\ExchangeException;
8 6
 use garethp\ews\API\ExchangeWebServices;
9 7
 use garethp\ews\API\Message\GetServerTimeZonesType;
Please login to merge, or discard this patch.
Doc Comments   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,6 +165,10 @@  discard block
 block discarded – undo
165 165
         ));
166 166
     }
167 167
 
168
+    /**
169
+     * @param string $username
170
+     * @param string $password
171
+     */
168 172
     public static function withUsernameAndPassword($server, $username, $password, $options = [])
169 173
     {
170 174
         return new static(ExchangeWebServices::fromUsernameAndPassword(
@@ -249,6 +253,9 @@  discard block
 block discarded – undo
249 253
         return $response;
250 254
     }
251 255
 
256
+    /**
257
+     * @param string $uriType
258
+     */
252 259
     protected function getFieldURI($uriType, $key = null, $value = null)
253 260
     {
254 261
         if (strpos($key, ':') !== false) {
@@ -456,7 +463,7 @@  discard block
 block discarded – undo
456 463
 
457 464
     /**
458 465
      * @param $identifier
459
-     * @return Type\BaseFolderType
466
+     * @return Type
460 467
      */
461 468
     public function getFolder($identifier)
462 469
     {
@@ -477,7 +484,7 @@  discard block
 block discarded – undo
477 484
      * Get a folder by it's distinguishedId
478 485
      *
479 486
      * @param string $distinguishedId
480
-     * @return Type\BaseFolderType
487
+     * @return Type
481 488
      */
482 489
     public function getFolderByDistinguishedId($distinguishedId)
483 490
     {
@@ -491,7 +498,7 @@  discard block
 block discarded – undo
491 498
 
492 499
     /**
493 500
      * @param $folderId
494
-     * @return Type\BaseFolderType
501
+     * @return Type
495 502
      */
496 503
     public function getFolderByFolderId($folderId)
497 504
     {
@@ -577,7 +584,7 @@  discard block
 block discarded – undo
577 584
      * @param Type\FolderIdType $folderId
578 585
      * @param null $syncState
579 586
      * @param array $options
580
-     * @return SyncFolderItemsResponseMessageType
587
+     * @return Type
581 588
      */
582 589
     public function listItemChanges($folderId, $syncState = null, $options = array())
583 590
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -434,7 +434,7 @@
 block discarded – undo
434 434
             if ($item instanceof Type\ItemIdType) {
435 435
                 $item = $item->toArray();
436 436
             }
437
-            $item = (array)$item;
437
+            $item = (array) $item;
438 438
             $itemIds[] = array(
439 439
                 'Id' => $item['Id'],
440 440
                 'ChangeKey' => $item['ChangeKey']
Please login to merge, or discard this patch.