Skip to content

Commit

Permalink
Merge pull request #3 from spatie/analysis-zd4K6J
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
freekmurze authored Sep 28, 2017
2 parents 8730162 + 58645c2 commit 9e79b85
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/Generators/IcsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ public function generate(Link $link): string
{
$url = 'data:text/calendar;charset=utf8,';

$url .= "BEGIN:VCALENDAR%0A";
$url .= "VERSION:2.0%0A";
$url .= "BEGIN:VEVENT%0A";
$url .= "DTSTART:".$link->from->format('Ymd\THis')."%0A";
$url .= "DTEND:".$link->to->format('Ymd\THis')."%0A";
$url .= 'BEGIN:VCALENDAR%0A';
$url .= 'VERSION:2.0%0A';
$url .= 'BEGIN:VEVENT%0A';
$url .= 'DTSTART:'.$link->from->format('Ymd\THis').'%0A';
$url .= 'DTEND:'.$link->to->format('Ymd\THis').'%0A';
$url .= "SUMMARY:{$link->title}%0A";

if ($link->description) {
$url .= "DESCRIPTION:{$link->description}%0A";
}

if ($link->address) {
$url .= "LOCATION:".str_replace(',', '', $link->address)."%0A";
$url .= 'LOCATION:'.str_replace(',', '', $link->address).'%0A';
}

$url .= "END:VEVENT%0A";
$url .= "END:VCALENDAR";
$url .= 'END:VEVENT%0A';
$url .= 'END:VCALENDAR';

return $url;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use DateTime;
use Spatie\CalendarLinks\Exceptions\InvalidLink;
use Spatie\CalendarLinks\Generators\GoogleGenerator;
use Spatie\CalendarLinks\Generators\IcsGenerator;
use Spatie\CalendarLinks\Generators\YahooGenerator;
use Spatie\CalendarLinks\Generators\GoogleGenerator;

/**
* @property string $title
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return 'https://calendar.google.com/calendar/render?action=TEMPLATE&text=Birthday&dates=20180201T090000/20180201T180000&details=With+clowns+and+stuff&location=Party+Lane+1A%2C+1337+Funtown&sprop=&sprop=name:';
<?php

return 'https://calendar.google.com/calendar/render?action=TEMPLATE&text=Birthday&dates=20180201T090000/20180201T180000&details=With+clowns+and+stuff&location=Party+Lane+1A%2C+1337+Funtown&sprop=&sprop=name:';
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return 'data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20180201T090000%0ADTEND:20180201T180000%0ASUMMARY:Birthday%0ADESCRIPTION:With clowns and stuff%0ALOCATION:Party Lane 1A 1337 Funtown%0AEND:VEVENT%0AEND:VCALENDAR';
<?php

return 'data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:20180201T090000%0ADTEND:20180201T180000%0ASUMMARY:Birthday%0ADESCRIPTION:With clowns and stuff%0ALOCATION:Party Lane 1A 1337 Funtown%0AEND:VEVENT%0AEND:VCALENDAR';
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return 'https://calendar.yahoo.com/?v=60&view=d&type=20&title=Birthday&st=20180201T090000&et=20180201T180000&desc=With+clowns+and+stuff&in_loc=Party+Lane+1A%2C+1337+Funtown';
<?php

return 'https://calendar.yahoo.com/?v=60&view=d&type=20&title=Birthday&st=20180201T090000&et=20180201T180000&desc=With+clowns+and+stuff&in_loc=Party+Lane+1A%2C+1337+Funtown';

0 comments on commit 9e79b85

Please sign in to comment.