@@ -237,12 +237,12 @@ |
||
237 | 237 | $value = ''; |
238 | 238 | |
239 | 239 | // $d = defined |
240 | - $d = function ($part) use ($parts) { |
|
240 | + $d = function($part) use ($parts) { |
|
241 | 241 | return !is_null($parts[$part]); |
242 | 242 | }; |
243 | 243 | |
244 | 244 | // $r = read |
245 | - $r = function ($part) use ($parts) { |
|
245 | + $r = function($part) use ($parts) { |
|
246 | 246 | return $parts[$part]; |
247 | 247 | }; |
248 | 248 |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $self = $this; |
98 | 98 | |
99 | 99 | $properties = array_map( |
100 | - function ($jProp) use ($self) { |
|
100 | + function($jProp) use ($self) { |
|
101 | 101 | return $self->parseProperty($jProp); |
102 | 102 | }, |
103 | 103 | $jComp[1] |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | if (isset($jComp[2])) { |
107 | 107 | $components = array_map( |
108 | - function ($jComp) use ($self) { |
|
108 | + function($jComp) use ($self) { |
|
109 | 109 | return $self->parseComponent($jComp); |
110 | 110 | }, |
111 | 111 | $jComp[2] |
@@ -619,7 +619,7 @@ |
||
619 | 619 | return |
620 | 620 | preg_replace_callback( |
621 | 621 | '#(\^(\^|n|\'))#', |
622 | - function ($matches) { |
|
622 | + function($matches) { |
|
623 | 623 | switch ($matches[2]) { |
624 | 624 | case 'n': |
625 | 625 | return "\n"; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | public static $valueMap = [ |
51 | 51 | 'BINARY' => VObject\Property\Binary::class, |
52 | 52 | 'BOOLEAN' => VObject\Property\Boolean::class, |
53 | - 'CONTENT-ID' => VObject\Property\FlatText::class, // vCard 2.1 only |
|
53 | + 'CONTENT-ID' => VObject\Property\FlatText::class, // vCard 2.1 only |
|
54 | 54 | 'DATE' => VObject\Property\VCard\Date::class, |
55 | 55 | 'DATE-TIME' => VObject\Property\VCard\DateTime::class, |
56 | 56 | 'DATE-AND-OR-TIME' => VObject\Property\VCard\DateAndOrTime::class, // vCard only |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function getBaseComponents($componentName = null) |
177 | 177 | { |
178 | - $isBaseComponent = function ($component) { |
|
178 | + $isBaseComponent = function($component) { |
|
179 | 179 | if (!$component instanceof VObject\Component) { |
180 | 180 | return false; |
181 | 181 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function getBaseComponent($componentName = null) |
228 | 228 | { |
229 | - $isBaseComponent = function ($component) { |
|
229 | + $isBaseComponent = function($component) { |
|
230 | 230 | if (!$component instanceof VObject\Component) { |
231 | 231 | return false; |
232 | 232 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $timeZone = new DateTimeZone('UTC'); |
291 | 291 | } |
292 | 292 | |
293 | - $stripTimezones = function (Component $component) use ($timeZone, &$stripTimezones) { |
|
293 | + $stripTimezones = function(Component $component) use ($timeZone, &$stripTimezones) { |
|
294 | 294 | foreach ($component->children() as $componentChild) { |
295 | 295 | if ($componentChild instanceof Property\ICalendar\DateTime && $componentChild->hasTime()) { |
296 | 296 | $dt = $componentChild->getDateTimes($timeZone); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | */ |
517 | 517 | public function getByUID($uid) |
518 | 518 | { |
519 | - return array_filter($this->getComponents(), function ($item) use ($uid) { |
|
519 | + return array_filter($this->getComponents(), function($item) use ($uid) { |
|
520 | 520 | if (!$itemUid = $item->select('UID')) { |
521 | 521 | return false; |
522 | 522 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | $base = parse($basePath); |
34 | - $pick = function ($part) use ($base, $delta) { |
|
34 | + $pick = function($part) use ($base, $delta) { |
|
35 | 35 | if ($delta[$part]) { |
36 | 36 | return $delta[$part]; |
37 | 37 | } elseif ($base[$part]) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | // uriencode them first. |
188 | 188 | $uri = preg_replace_callback( |
189 | 189 | '/[^[:ascii:]]/u', |
190 | - function ($matches) { |
|
190 | + function($matches) { |
|
191 | 191 | return rawurlencode($matches[0]); |
192 | 192 | }, |
193 | 193 | $uri |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | // uriencode them first. |
317 | 317 | $uri = preg_replace_callback( |
318 | 318 | '/[^[:ascii:]]/u', |
319 | - function ($matches) { |
|
319 | + function($matches) { |
|
320 | 320 | return rawurlencode($matches[0]); |
321 | 321 | }, |
322 | 322 | $uri |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | function encodePath(string $path): string |
388 | 388 | { |
389 | - return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\)\/:@])/', function ($match) { |
|
389 | + return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\)\/:@])/', function($match) { |
|
390 | 390 | return '%'.sprintf('%02x', ord($match[0])); |
391 | 391 | }, $path); |
392 | 392 | } |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | */ |
399 | 399 | function encodePathSegment(string $pathSegment): string |
400 | 400 | { |
401 | - return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\):@])/', function ($match) { |
|
401 | + return preg_replace_callback('/([^A-Za-z0-9_\-\.~\(\):@])/', function($match) { |
|
402 | 402 | return '%'.sprintf('%02x', ord($match[0])); |
403 | 403 | }, $pathSegment); |
404 | 404 | } |
@@ -244,10 +244,10 @@ |
||
244 | 244 | { |
245 | 245 | list($namespace) = self::parseClarkNotation($elementName); |
246 | 246 | |
247 | - $this->elementMap[$elementName] = function (Reader $reader) use ($className, $namespace) { |
|
247 | + $this->elementMap[$elementName] = function(Reader $reader) use ($className, $namespace) { |
|
248 | 248 | return \Sabre\Xml\Deserializer\valueObject($reader, $className, $namespace); |
249 | 249 | }; |
250 | - $this->classMap[$className] = function (Writer $writer, $valueObject) use ($namespace) { |
|
250 | + $this->classMap[$className] = function(Writer $writer, $valueObject) use ($namespace) { |
|
251 | 251 | return \Sabre\Xml\Serializer\valueObject($writer, $valueObject, $namespace); |
252 | 252 | }; |
253 | 253 | $this->valueObjectMap[$className] = $elementName; |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | $value = self::toArray($object->{$key}, |
87 | 87 | $forceObjectTypeWhenEmpty); |
88 | 88 | if (self::$stringEncoderFunction && is_string($value)) { |
89 | - $value = self::$stringEncoderFunction ($value); |
|
89 | + $value = self::$stringEncoderFunction($value); |
|
90 | 90 | } elseif (self::$numberEncoderFunction && is_numeric($value)) { |
91 | - $value = self::$numberEncoderFunction ($value); |
|
91 | + $value = self::$numberEncoderFunction($value); |
|
92 | 92 | } |
93 | 93 | $array [$key] = $value; |
94 | 94 | } |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | } |
122 | 122 | $value = self::toArray($value, $forceObjectTypeWhenEmpty); |
123 | 123 | if (self::$stringEncoderFunction && is_string($value)) { |
124 | - $value = self::$encoderFunctionName ($value); |
|
124 | + $value = self::$encoderFunctionName($value); |
|
125 | 125 | } elseif (self::$numberEncoderFunction && is_numeric($value)) { |
126 | - $value = self::$numberEncoderFunction ($value); |
|
126 | + $value = self::$numberEncoderFunction($value); |
|
127 | 127 | } |
128 | 128 | $array [$key] = $value; |
129 | 129 | $count++; |