@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $supportedProperties = array_keys($this->propertyMap); |
301 | 301 | $supportedProperties[] = '{'.CalDAV\Plugin::NS_CALDAV.'}schedule-calendar-transp'; |
302 | 302 | |
303 | - $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId, $instanceId) { |
|
303 | + $propPatch->handle($supportedProperties, function($mutations) use ($calendarId, $instanceId) { |
|
304 | 304 | $newValues = []; |
305 | 305 | foreach ($mutations as $propertyName => $propertyValue) { |
306 | 306 | switch ($propertyName) { |
@@ -1185,7 +1185,7 @@ discard block |
||
1185 | 1185 | $supportedProperties = array_keys($this->subscriptionPropertyMap); |
1186 | 1186 | $supportedProperties[] = '{http://calendarserver.org/ns/}source'; |
1187 | 1187 | |
1188 | - $propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) { |
|
1188 | + $propPatch->handle($supportedProperties, function($mutations) use ($subscriptionId) { |
|
1189 | 1189 | $newValues = []; |
1190 | 1190 | |
1191 | 1191 | foreach ($mutations as $propertyName => $propertyValue) { |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $principalUrl = $node->getPrincipalUrl(); |
88 | 88 | |
89 | 89 | // notification-URL property |
90 | - $propFind->handle('{'.self::NS_CALENDARSERVER.'}notification-URL', function () use ($principalUrl, $caldavPlugin) { |
|
90 | + $propFind->handle('{'.self::NS_CALENDARSERVER.'}notification-URL', function() use ($principalUrl, $caldavPlugin) { |
|
91 | 91 | $notificationPath = $caldavPlugin->getCalendarHomeForPrincipal($principalUrl).'/notifications/'; |
92 | 92 | |
93 | 93 | return new DAV\Xml\Property\Href($notificationPath); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function propFindEarly(DAV\PropFind $propFind, DAV\INode $node) |
102 | 102 | { |
103 | 103 | if ($node instanceof ISharedCalendar) { |
104 | - $propFind->handle('{'.Plugin::NS_CALENDARSERVER.'}invite', function () use ($node) { |
|
104 | + $propFind->handle('{'.Plugin::NS_CALENDARSERVER.'}invite', function() use ($node) { |
|
105 | 105 | return new Xml\Property\Invite( |
106 | 106 | $node->getInvites() |
107 | 107 | ); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | break; |
130 | 130 | } |
131 | 131 | } |
132 | - $propFind->handle('{'.Plugin::NS_CALENDARSERVER.'}allowed-sharing-modes', function () { |
|
132 | + $propFind->handle('{'.Plugin::NS_CALENDARSERVER.'}allowed-sharing-modes', function() { |
|
133 | 133 | return new Xml\Property\AllowedSharingModes(true, false); |
134 | 134 | }); |
135 | 135 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | if (\Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER === $node->getShareAccess() || \Sabre\DAV\Sharing\Plugin::ACCESS_NOTSHARED === $node->getShareAccess()) { |
159 | - $propPatch->handle('{DAV:}resourcetype', function ($value) use ($node) { |
|
159 | + $propPatch->handle('{DAV:}resourcetype', function($value) use ($node) { |
|
160 | 160 | if ($value->is('{'.Plugin::NS_CALENDARSERVER.'}shared-owner')) { |
161 | 161 | return false; |
162 | 162 | } |
@@ -198,7 +198,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -136,22 +136,22 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -31,7 +31,7 @@ |
||
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 | } |
@@ -101,7 +101,7 @@ |
||
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) { |
@@ -37,7 +37,7 @@ |
||
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 | } |
@@ -53,11 +53,11 @@ |
||
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 |