Completed
Branch develop (37f7b7)
by
unknown
24:41
created
htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Plugin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             $principalUrl = $node->getPrincipalUrl();
199 199
 
200 200
             // schedule-outbox-URL property
201
-            $propFind->handle('{'.self::NS_CALDAV.'}schedule-outbox-URL', function () use ($principalUrl, $caldavPlugin) {
201
+            $propFind->handle('{'.self::NS_CALDAV.'}schedule-outbox-URL', function() use ($principalUrl, $caldavPlugin) {
202 202
                 $calendarHomePath = $caldavPlugin->getCalendarHomeForPrincipal($principalUrl);
203 203
                 if (!$calendarHomePath) {
204 204
                     return null;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 return new LocalHref($outboxPath);
209 209
             });
210 210
             // schedule-inbox-URL property
211
-            $propFind->handle('{'.self::NS_CALDAV.'}schedule-inbox-URL', function () use ($principalUrl, $caldavPlugin) {
211
+            $propFind->handle('{'.self::NS_CALDAV.'}schedule-inbox-URL', function() use ($principalUrl, $caldavPlugin) {
212 212
                 $calendarHomePath = $caldavPlugin->getCalendarHomeForPrincipal($principalUrl);
213 213
                 if (!$calendarHomePath) {
214 214
                     return null;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 return new LocalHref($inboxPath);
219 219
             });
220 220
 
221
-            $propFind->handle('{'.self::NS_CALDAV.'}schedule-default-calendar-URL', function () use ($principalUrl, $caldavPlugin) {
221
+            $propFind->handle('{'.self::NS_CALDAV.'}schedule-default-calendar-URL', function() use ($principalUrl, $caldavPlugin) {
222 222
                 // We don't support customizing this property yet, so in the
223 223
                 // meantime we just grab the first calendar in the home-set.
224 224
                 $calendarHomePath = $caldavPlugin->getCalendarHomeForPrincipal($principalUrl);
@@ -258,13 +258,13 @@  discard block
 block discarded – undo
258 258
 
259 259
             // The server currently reports every principal to be of type
260 260
             // 'INDIVIDUAL'
261
-            $propFind->handle('{'.self::NS_CALDAV.'}calendar-user-type', function () {
261
+            $propFind->handle('{'.self::NS_CALDAV.'}calendar-user-type', function() {
262 262
                 return 'INDIVIDUAL';
263 263
             });
264 264
         }
265 265
 
266 266
         // Mapping the old property to the new property.
267
-        $propFind->handle('{http://calendarserver.org/ns/}calendar-availability', function () use ($propFind, $node) {
267
+        $propFind->handle('{http://calendarserver.org/ns/}calendar-availability', function() use ($propFind, $node) {
268 268
             // In case it wasn't clear, the only difference is that we map the
269 269
             // old property to a different namespace.
270 270
             $availProp = '{'.self::NS_CALDAV.'}calendar-availability';
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     public function propPatch($path, PropPatch $propPatch)
295 295
     {
296 296
         // Mapping the old property to the new property.
297
-        $propPatch->handle('{http://calendarserver.org/ns/}calendar-availability', function ($value) use ($path) {
297
+        $propPatch->handle('{http://calendarserver.org/ns/}calendar-availability', function($value) use ($path) {
298 298
             $availProp = '{'.self::NS_CALDAV.'}calendar-availability';
299 299
             $subPropPatch = new PropPatch([$availProp => $value]);
300 300
             $this->server->emit('propPatch', [$path, $subPropPatch]);
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
                 'time-range' => null,
920 920
             ]);
921 921
 
922
-            $calObjects = array_map(function ($url) use ($node) {
922
+            $calObjects = array_map(function($url) use ($node) {
923 923
                 $obj = $node->getChild($url)->get();
924 924
 
925 925
                 return $obj;
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/CardDAV/Plugin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,22 +136,22 @@  discard block
 block discarded – undo
136 136
 
137 137
         if ($node instanceof IAddressBook) {
138 138
             $propFind->handle($ns.'max-resource-size', $this->maxResourceSize);
139
-            $propFind->handle($ns.'supported-address-data', function () {
139
+            $propFind->handle($ns.'supported-address-data', function() {
140 140
                 return new Xml\Property\SupportedAddressData();
141 141
             });
142
-            $propFind->handle($ns.'supported-collation-set', function () {
142
+            $propFind->handle($ns.'supported-collation-set', function() {
143 143
                 return new Xml\Property\SupportedCollationSet();
144 144
             });
145 145
         }
146 146
         if ($node instanceof DAVACL\IPrincipal) {
147 147
             $path = $propFind->getPath();
148 148
 
149
-            $propFind->handle('{'.self::NS_CARDDAV.'}addressbook-home-set', function () use ($path) {
149
+            $propFind->handle('{'.self::NS_CARDDAV.'}addressbook-home-set', function() use ($path) {
150 150
                 return new LocalHref($this->getAddressBookHomeForPrincipal($path).'/');
151 151
             });
152 152
 
153 153
             if ($this->directories) {
154
-                $propFind->handle('{'.self::NS_CARDDAV.'}directory-gateway', function () {
154
+                $propFind->handle('{'.self::NS_CARDDAV.'}directory-gateway', function() {
155 155
                     return new LocalHref($this->directories);
156 156
                 });
157 157
             }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             // The address-data property is not supposed to be a 'real'
162 162
             // property, but in large chunks of the spec it does act as such.
163 163
             // Therefore we simply expose it as a property.
164
-            $propFind->handle('{'.self::NS_CARDDAV.'}address-data', function () use ($node) {
164
+            $propFind->handle('{'.self::NS_CARDDAV.'}address-data', function() use ($node) {
165 165
                 $val = $node->get();
166 166
                 if (is_resource($val)) {
167 167
                     $val = stream_get_contents($val);
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
         $input = VObject\Reader::read($data);
809 809
         if (!empty($propertiesFilter)) {
810 810
             $propertiesFilter = array_merge(['UID', 'VERSION', 'FN'], $propertiesFilter);
811
-            $keys = array_unique(array_map(function ($child) {
811
+            $keys = array_unique(array_map(function($child) {
812 812
                 return $child->name;
813 813
             }, $input->children()));
814 814
             $keys = array_diff($keys, $propertiesFilter);
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/AbstractBackend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function getMultipleCards($addressBookId, array $uris)
33 33
     {
34
-        return array_map(function ($uri) use ($addressBookId) {
34
+        return array_map(function($uri) use ($addressBookId) {
35 35
             return $this->getCard($addressBookId, $uri);
36 36
         }, $uris);
37 37
     }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/PDO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             '{'.CardDAV\Plugin::NS_CARDDAV.'}addressbook-description',
102 102
         ];
103 103
 
104
-        $propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) {
104
+        $propPatch->handle($supportedProperties, function($mutations) use ($addressBookId) {
105 105
             $updates = [];
106 106
             foreach ($mutations as $property => $newValue) {
107 107
                 switch ($property) {
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/CardDAV/VCFExportPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $this->server = $server;
39 39
         $this->server->on('method:GET', [$this, 'httpGet'], 90);
40
-        $server->on('browserButtonActions', function ($path, $node, &$actions) {
40
+        $server->on('browserButtonActions', function($path, $node, &$actions) {
41 41
             if ($node instanceof IAddressBook) {
42 42
                 $actions .= '<a href="'.htmlspecialchars($path, ENT_QUOTES, 'UTF-8').'?export"><span class="oi" data-glyph="book"></span></a>';
43 43
             }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@
 block discarded – undo
53 53
         ];
54 54
 
55 55
         $elems = (array) $reader->parseInnerTree();
56
-        $elems = array_filter($elems, function ($element) {
56
+        $elems = array_filter($elems, function($element) {
57 57
             return '{urn:ietf:params:xml:ns:carddav}prop' === $element['name'] &&
58 58
                 isset($element['attributes']['name']);
59 59
         });
60
-        $result['addressDataProperties'] = array_map(function ($element) {
60
+        $result['addressDataProperties'] = array_map(function($element) {
61 61
             return $element['attributes']['name'];
62 62
         }, $elems);
63 63
 
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAVACL/Plugin.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         ];
524 524
 
525 525
         $fpsTraverse = null;
526
-        $fpsTraverse = function ($privName, $privInfo, $concrete, &$flat) use (&$fpsTraverse) {
526
+        $fpsTraverse = function($privName, $privInfo, $concrete, &$flat) use (&$fpsTraverse) {
527 527
             $myPriv = [
528 528
                 'privilege' => $privName,
529 529
                 'abstract' => isset($privInfo['abstract']) && $privInfo['abstract'],
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
         $server->on('report', [$this, 'report']);
783 783
         $server->on('method:ACL', [$this, 'httpAcl']);
784 784
         $server->on('onHTMLActionsPanel', [$this, 'htmlActionsPanel']);
785
-        $server->on('getPrincipalByUri', function ($principal, &$uri) {
785
+        $server->on('getPrincipalByUri', function($principal, &$uri) {
786 786
             $uri = $this->getPrincipalByUri($principal);
787 787
 
788 788
             // Break event chain
@@ -953,13 +953,13 @@  discard block
 block discarded – undo
953 953
 
954 954
         /* Adding principal properties */
955 955
         if ($node instanceof IPrincipal) {
956
-            $propFind->handle('{DAV:}alternate-URI-set', function () use ($node) {
956
+            $propFind->handle('{DAV:}alternate-URI-set', function() use ($node) {
957 957
                 return new Href($node->getAlternateUriSet());
958 958
             });
959
-            $propFind->handle('{DAV:}principal-URL', function () use ($node) {
959
+            $propFind->handle('{DAV:}principal-URL', function() use ($node) {
960 960
                 return new Href($node->getPrincipalUrl().'/');
961 961
             });
962
-            $propFind->handle('{DAV:}group-member-set', function () use ($node) {
962
+            $propFind->handle('{DAV:}group-member-set', function() use ($node) {
963 963
                 $members = $node->getGroupMemberSet();
964 964
                 foreach ($members as $k => $member) {
965 965
                     $members[$k] = rtrim($member, '/').'/';
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
 
968 968
                 return new Href($members);
969 969
             });
970
-            $propFind->handle('{DAV:}group-membership', function () use ($node) {
970
+            $propFind->handle('{DAV:}group-membership', function() use ($node) {
971 971
                 $members = $node->getGroupMembership();
972 972
                 foreach ($members as $k => $member) {
973 973
                     $members[$k] = rtrim($member, '/').'/';
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
             $propFind->handle('{DAV:}displayname', [$node, 'getDisplayName']);
979 979
         }
980 980
 
981
-        $propFind->handle('{DAV:}principal-collection-set', function () {
981
+        $propFind->handle('{DAV:}principal-collection-set', function() {
982 982
             $val = $this->principalCollectionSet;
983 983
             // Ensuring all collections end with a slash
984 984
             foreach ($val as $k => $v) {
@@ -987,17 +987,17 @@  discard block
 block discarded – undo
987 987
 
988 988
             return new Href($val);
989 989
         });
990
-        $propFind->handle('{DAV:}current-user-principal', function () {
990
+        $propFind->handle('{DAV:}current-user-principal', function() {
991 991
             if ($url = $this->getCurrentUserPrincipal()) {
992 992
                 return new Xml\Property\Principal(Xml\Property\Principal::HREF, $url.'/');
993 993
             } else {
994 994
                 return new Xml\Property\Principal(Xml\Property\Principal::UNAUTHENTICATED);
995 995
             }
996 996
         });
997
-        $propFind->handle('{DAV:}supported-privilege-set', function () use ($node) {
997
+        $propFind->handle('{DAV:}supported-privilege-set', function() use ($node) {
998 998
             return new Xml\Property\SupportedPrivilegeSet($this->getSupportedPrivilegeSet($node));
999 999
         });
1000
-        $propFind->handle('{DAV:}current-user-privilege-set', function () use ($node, $propFind, $path) {
1000
+        $propFind->handle('{DAV:}current-user-privilege-set', function() use ($node, $propFind, $path) {
1001 1001
             if (!$this->checkPrivileges($path, '{DAV:}read-current-user-privilege-set', self::R_PARENT, false)) {
1002 1002
                 $propFind->set('{DAV:}current-user-privilege-set', null, 403);
1003 1003
             } else {
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
                 return new Xml\Property\CurrentUserPrivilegeSet($val);
1007 1007
             }
1008 1008
         });
1009
-        $propFind->handle('{DAV:}acl', function () use ($node, $propFind, $path) {
1009
+        $propFind->handle('{DAV:}acl', function() use ($node, $propFind, $path) {
1010 1010
             /* The ACL property contains all the permissions */
1011 1011
             if (!$this->checkPrivileges($path, '{DAV:}read-acl', self::R_PARENT, false)) {
1012 1012
                 $propFind->set('{DAV:}acl', null, 403);
@@ -1016,13 +1016,13 @@  discard block
 block discarded – undo
1016 1016
                 return new Xml\Property\Acl($this->getACL($node));
1017 1017
             }
1018 1018
         });
1019
-        $propFind->handle('{DAV:}acl-restrictions', function () {
1019
+        $propFind->handle('{DAV:}acl-restrictions', function() {
1020 1020
             return new Xml\Property\AclRestrictions();
1021 1021
         });
1022 1022
 
1023 1023
         /* Adding ACL properties */
1024 1024
         if ($node instanceof IACL) {
1025
-            $propFind->handle('{DAV:}owner', function () use ($node) {
1025
+            $propFind->handle('{DAV:}owner', function() use ($node) {
1026 1026
                 return new Href($node->getOwner().'/');
1027 1027
             });
1028 1028
         }
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
      */
1037 1037
     public function propPatch($path, DAV\PropPatch $propPatch)
1038 1038
     {
1039
-        $propPatch->handle('{DAV:}group-member-set', function ($value) use ($path) {
1039
+        $propPatch->handle('{DAV:}group-member-set', function($value) use ($path) {
1040 1040
             if (is_null($value)) {
1041 1041
                 $memberSet = [];
1042 1042
             } elseif ($value instanceof Href) {
Please login to merge, or discard this patch.
includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@
 block discarded – undo
82 82
             }
83 83
 
84 84
             $namespace = isset($elem['attributes']['namespace']) ?
85
-                $elem['attributes']['namespace'] :
86
-                'DAV:';
85
+                $elem['attributes']['namespace'] : 'DAV:';
87 86
 
88 87
             $propName = '{'.$namespace.'}'.$elem['attributes']['name'];
89 88
 
Please login to merge, or discard this patch.
includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      */
87 87
     public function toHtml(HtmlOutputHelper $html)
88 88
     {
89
-        $traverse = function ($privName, $priv) use (&$traverse, $html) {
89
+        $traverse = function($privName, $priv) use (&$traverse, $html) {
90 90
             echo '<li>';
91 91
             echo $html->xmlName($privName);
92 92
             if (isset($priv['abstract']) && $priv['abstract']) {
Please login to merge, or discard this patch.