aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/bin/generateicalendardata.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
committerMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
commite779335d060b3a51d6a144d23af4097ae6801473 (patch)
tree2427765313f715a0e5b48228abe5200cb82b787f /vendor/sabre/vobject/bin/generateicalendardata.php
parente937e8fff96a935b14a479c062f6b0d00b90b99d (diff)
downloadvolse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.gz
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.bz2
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.zip
update composer libs
Diffstat (limited to 'vendor/sabre/vobject/bin/generateicalendardata.php')
-rw-r--r--vendor/sabre/vobject/bin/generateicalendardata.php33
1 files changed, 16 insertions, 17 deletions
diff --git a/vendor/sabre/vobject/bin/generateicalendardata.php b/vendor/sabre/vobject/bin/generateicalendardata.php
index a2df3c63a..62b6107c5 100644
--- a/vendor/sabre/vobject/bin/generateicalendardata.php
+++ b/vendor/sabre/vobject/bin/generateicalendardata.php
@@ -23,54 +23,53 @@ HI
$events = 100;
-if (isset($argv[1])) $events = (int)$argv[1];
+if (isset($argv[1])) {
+ $events = (int) $argv[1];
+}
-include __DIR__ . '/../vendor/autoload.php';
+include __DIR__.'/../vendor/autoload.php';
-fwrite(STDERR, "Generating " . $events . " events\n");
+fwrite(STDERR, 'Generating '.$events." events\n");
-$currentDate = new DateTime('-' . round($events / 2) . ' days');
+$currentDate = new DateTime('-'.round($events / 2).' days');
$calendar = new VObject\Component\VCalendar();
$ii = 0;
while ($ii < $events) {
-
- $ii++;
+ ++$ii;
$event = $calendar->add('VEVENT');
$event->DTSTART = 'bla';
- $event->SUMMARY = 'Event #' . $ii;
+ $event->SUMMARY = 'Event #'.$ii;
$event->UID = md5(microtime(true));
$doctorRandom = mt_rand(1, 1000);
switch ($doctorRandom) {
// All-day event
- case 1 :
+ case 1:
$event->DTEND = 'bla';
$dtStart = clone $currentDate;
$dtEnd = clone $currentDate;
- $dtEnd->modify('+' . mt_rand(1, 3) . ' days');
+ $dtEnd->modify('+'.mt_rand(1, 3).' days');
$event->DTSTART->setDateTime($dtStart);
$event->DTSTART['VALUE'] = 'DATE';
$event->DTEND->setDateTime($dtEnd);
break;
- case 2 :
- $event->RRULE = 'FREQ=DAILY;COUNT=' . mt_rand(1, 10);
- // No break intentional
- default :
+ case 2:
+ $event->RRULE = 'FREQ=DAILY;COUNT='.mt_rand(1, 10);
+ // no break intentional
+ default:
$dtStart = clone $currentDate;
$dtStart->setTime(mt_rand(1, 23), mt_rand(0, 59), mt_rand(0, 59));
$event->DTSTART->setDateTime($dtStart);
- $event->DURATION = 'PT' . mt_rand(1, 3) . 'H';
+ $event->DURATION = 'PT'.mt_rand(1, 3).'H';
break;
-
}
-
- $currentDate->modify('+ ' . mt_rand(0, 3) . ' days');
+ $currentDate->modify('+ '.mt_rand(0, 3).' days');
}
fwrite(STDERR, "Validating\n");