@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function assertVObjectEqualsVObject($expected, $actual, $message = '') |
| 36 | 36 | { |
| 37 | - $getObj = function ($input) { |
|
| 37 | + $getObj = function($input) { |
|
| 38 | 38 | if (is_resource($input)) { |
| 39 | 39 | $input = stream_get_contents($input); |
| 40 | 40 | } |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | * |
| 514 | 514 | * @return int |
| 515 | 515 | */ |
| 516 | - $sortScore = function ($key, $array) { |
|
| 516 | + $sortScore = function($key, $array) { |
|
| 517 | 517 | if ($array[$key] instanceof Component) { |
| 518 | 518 | // We want to encode VTIMEZONE first, this is a personal |
| 519 | 519 | // preference. |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | $tmp = $children; |
| 549 | 549 | uksort( |
| 550 | 550 | $children, |
| 551 | - function ($a, $b) use ($sortScore, $tmp) { |
|
| 551 | + function($a, $b) use ($sortScore, $tmp) { |
|
| 552 | 552 | $sA = $sortScore($a, $tmp); |
| 553 | 553 | $sB = $sortScore($b, $tmp); |
| 554 | 554 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | // more. |
| 238 | 238 | return array_filter( |
| 239 | 239 | $result, |
| 240 | - function ($child) use ($group) { |
|
| 240 | + function($child) use ($group) { |
|
| 241 | 241 | return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group; |
| 242 | 242 | } |
| 243 | 243 | ); |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * |
| 283 | 283 | * @return int |
| 284 | 284 | */ |
| 285 | - $sortScore = function ($key, $array) { |
|
| 285 | + $sortScore = function($key, $array) { |
|
| 286 | 286 | if ($array[$key] instanceof Component) { |
| 287 | 287 | // We want to encode VTIMEZONE first, this is a personal |
| 288 | 288 | // preference. |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $tmp = $children; |
| 318 | 318 | uksort( |
| 319 | 319 | $children, |
| 320 | - function ($a, $b) use ($sortScore, $tmp) { |
|
| 320 | + function($a, $b) use ($sortScore, $tmp) { |
|
| 321 | 321 | $sA = $sortScore($a, $tmp); |
| 322 | 322 | $sB = $sortScore($b, $tmp); |
| 323 | 323 | |
@@ -632,8 +632,7 @@ discard block |
||
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | $oldInstances = !empty($oldEventInfo['attendees'][$attendee]['instances']) ? |
| 635 | - $oldEventInfo['attendees'][$attendee]['instances'] : |
|
| 636 | - []; |
|
| 635 | + $oldEventInfo['attendees'][$attendee]['instances'] : []; |
|
| 637 | 636 | |
| 638 | 637 | $instances = []; |
| 639 | 638 | foreach ($oldInstances as $instance) { |
@@ -849,12 +848,10 @@ discard block |
||
| 849 | 848 | } |
| 850 | 849 | $organizerForceSend = |
| 851 | 850 | isset($vevent->ORGANIZER['SCHEDULE-FORCE-SEND']) ? |
| 852 | - strtoupper($vevent->ORGANIZER['SCHEDULE-FORCE-SEND']) : |
|
| 853 | - null; |
|
| 851 | + strtoupper($vevent->ORGANIZER['SCHEDULE-FORCE-SEND']) : null; |
|
| 854 | 852 | $organizerScheduleAgent = |
| 855 | 853 | isset($vevent->ORGANIZER['SCHEDULE-AGENT']) ? |
| 856 | - strtoupper((string) $vevent->ORGANIZER['SCHEDULE-AGENT']) : |
|
| 857 | - 'SERVER'; |
|
| 854 | + strtoupper((string) $vevent->ORGANIZER['SCHEDULE-AGENT']) : 'SERVER'; |
|
| 858 | 855 | } |
| 859 | 856 | if (is_null($sequence) && isset($vevent->SEQUENCE)) { |
| 860 | 857 | $sequence = $vevent->SEQUENCE->getValue(); |
@@ -902,13 +899,11 @@ discard block |
||
| 902 | 899 | } |
| 903 | 900 | $partStat = |
| 904 | 901 | isset($attendee['PARTSTAT']) ? |
| 905 | - strtoupper($attendee['PARTSTAT']) : |
|
| 906 | - 'NEEDS-ACTION'; |
|
| 902 | + strtoupper($attendee['PARTSTAT']) : 'NEEDS-ACTION'; |
|
| 907 | 903 | |
| 908 | 904 | $forceSend = |
| 909 | 905 | isset($attendee['SCHEDULE-FORCE-SEND']) ? |
| 910 | - strtoupper($attendee['SCHEDULE-FORCE-SEND']) : |
|
| 911 | - null; |
|
| 906 | + strtoupper($attendee['SCHEDULE-FORCE-SEND']) : null; |
|
| 912 | 907 | |
| 913 | 908 | if (isset($attendees[$attendee->getNormalizedValue()])) { |
| 914 | 909 | $attendees[$attendee->getNormalizedValue()]['instances'][$recurId] = [ |
@@ -285,7 +285,7 @@ |
||
| 285 | 285 | { |
| 286 | 286 | $values = $this->getParts(); |
| 287 | 287 | |
| 288 | - $map = function ($items) use ($values, $writer) { |
|
| 288 | + $map = function($items) use ($values, $writer) { |
|
| 289 | 289 | foreach ($items as $i => $item) { |
| 290 | 290 | $writer->writeElement( |
| 291 | 291 | $item, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function setJsonValue(array $value) |
| 43 | 43 | { |
| 44 | 44 | $value = array_map( |
| 45 | - function ($value) { |
|
| 45 | + function($value) { |
|
| 46 | 46 | return str_replace(':', '', $value); |
| 47 | 47 | }, |
| 48 | 48 | $value |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | public function getJsonValue() |
| 61 | 61 | { |
| 62 | 62 | return array_map( |
| 63 | - function ($value) { |
|
| 63 | + function($value) { |
|
| 64 | 64 | return substr($value, 0, -2).':'. |
| 65 | 65 | substr($value, -2); |
| 66 | 66 | }, |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | public function setJsonValue(array $value) |
| 72 | 72 | { |
| 73 | 73 | $value = array_map( |
| 74 | - function ($item) { |
|
| 74 | + function($item) { |
|
| 75 | 75 | return strtr(implode('/', $item), [':' => '', '-' => '']); |
| 76 | 76 | }, |
| 77 | 77 | $value |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | $isUtc = $isFloating ? false : in_array($tz->getName(), ['UTC', 'GMT', 'Z']); |
| 262 | 262 | |
| 263 | 263 | return array_map( |
| 264 | - function (DateTimeInterface $dt) use ($hasTime, $isUtc) { |
|
| 264 | + function(DateTimeInterface $dt) use ($hasTime, $isUtc) { |
|
| 265 | 265 | if ($hasTime) { |
| 266 | 266 | return $dt->format('Y-m-d\\TH:i:s').($isUtc ? 'Z' : ''); |
| 267 | 267 | } else { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | // those. |
| 286 | 286 | $this->setValue( |
| 287 | 287 | array_map( |
| 288 | - function ($item) { |
|
| 288 | + function($item) { |
|
| 289 | 289 | return strtr($item, [':' => '', '-' => '']); |
| 290 | 290 | }, |
| 291 | 291 | $value |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | public function setXmlValue(array $value) |
| 63 | 63 | { |
| 64 | 64 | $value = array_map( |
| 65 | - function ($value) { |
|
| 65 | + function($value) { |
|
| 66 | 66 | return 'true' === $value; |
| 67 | 67 | }, |
| 68 | 68 | $value |