Skip to content

Commit

Permalink
Improve wording
Browse files Browse the repository at this point in the history
Indentation
Spacing
  • Loading branch information
u01jmg3 committed Aug 1, 2017
1 parent 539ce70 commit 4000d5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ We appreciate pull requests, here are our guidelines:
1. Firstly, check if your issue is present within the latest version (`dev-master`) as the problem may already have been fixed.
1. Log a bug in our [issue tracker](https://github.com/u01jmg3/ics-parser/issues) (if there isn't one already).
- If your patch is going to be large it might be a good idea to get the discussion started early.
- We are happy to discuss it in a new issue beforehand.
- We are happy to discuss it in an issue beforehand.
- If you could provide an iCal snippet causing the parser to behave incorrectly it is extremely useful for debugging
- Please remove any irrelevant events
1. Please follow the coding standard already present in the file you're editing _before_ committing
- Please remove all irrelevant events
1. Please follow the coding standard already present in the file you are editing _before_ committing
- Adhere to the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standard
- Use *4 spaces* instead of tabs for indentation
- Trim all trailing whitespace and blank lines
Expand Down
30 changes: 15 additions & 15 deletions src/ICal/ICal.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,31 +326,31 @@ protected function initLines(array $lines)
$this->todoCount++;
}
$component = 'VTODO';
break;
break;

// http://www.kanzaki.com/docs/ical/vevent.html
case 'BEGIN:VEVENT':
if (!is_array($value)) {
$this->eventCount++;
}
$component = 'VEVENT';
break;
break;

// http://www.kanzaki.com/docs/ical/vfreebusy.html
case 'BEGIN:VFREEBUSY':
if (!is_array($value)) {
$this->freeBusyIndex++;
}
$component = 'VFREEBUSY';
break;
break;

case 'BEGIN:DAYLIGHT':
case 'BEGIN:STANDARD':
case 'BEGIN:VALARM':
case 'BEGIN:VCALENDAR':
case 'BEGIN:VTIMEZONE':
$component = $value;
break;
break;

case 'END:DAYLIGHT':
case 'END:STANDARD':
Expand All @@ -361,11 +361,11 @@ protected function initLines(array $lines)
case 'END:VTIMEZONE':
case 'END:VTODO':
$component = 'VCALENDAR';
break;
break;

default:
$this->addCalendarComponentWithKeyAndValue($component, $keyword, $value);
break;
break;
}
}
}
Expand Down Expand Up @@ -413,7 +413,7 @@ protected function addCalendarComponentWithKeyAndValue($component, $keyword, $va
switch ($component) {
case 'VTODO':
$this->cal[$component][$this->todoCount - 1][$keyword] = $value;
break;
break;

case 'VEVENT':
if (!isset($this->cal[$component][$this->eventCount - 1][$keyword . '_array'])) {
Expand Down Expand Up @@ -449,7 +449,7 @@ protected function addCalendarComponentWithKeyAndValue($component, $keyword, $va
$this->cal[$component][$this->eventCount - 1][$keyword] .= ',' . $value;
}
}
break;
break;

case 'VFREEBUSY':
if ($keyword === 'FREEBUSY') {
Expand All @@ -467,11 +467,11 @@ protected function addCalendarComponentWithKeyAndValue($component, $keyword, $va
} else {
$this->cal[$component][$this->freeBusyIndex - 1][$keyword][] = $value;
}
break;
break;

default:
$this->cal[$component][$keyword] = $value;
break;
break;
}

$this->lastKeyword = $keyword;
Expand Down Expand Up @@ -958,7 +958,7 @@ protected function processRecurrences()
$allRecurrenceEvents = array_merge($allRecurrenceEvents, $recurrenceEvents);
$recurrenceEvents = array(); // Reset

break;
break;

case 'WEEKLY':
// Create offset
Expand Down Expand Up @@ -1062,7 +1062,7 @@ protected function processRecurrences()
$allRecurrenceEvents = array_merge($allRecurrenceEvents, $recurrenceEvents);
$recurrenceEvents = array(); // Reset

break;
break;

case 'MONTHLY':
// Create offset
Expand Down Expand Up @@ -1272,7 +1272,7 @@ protected function processRecurrences()
$allRecurrenceEvents = array_merge($allRecurrenceEvents, $recurrenceEvents);
$recurrenceEvents = array(); // Reset

break;
break;

case 'YEARLY':
// Create offset
Expand Down Expand Up @@ -1459,7 +1459,7 @@ protected function processRecurrences()
$allRecurrenceEvents = array_merge($allRecurrenceEvents, $recurrenceEvents);
$recurrenceEvents = array(); // Reset

break;
break;
}
}
}
Expand Down Expand Up @@ -1860,7 +1860,7 @@ protected function convertDayOrdinalToPositive($dayNumber, $weekday, $timestamp)

$timestamp = (is_object($timestamp)) ? $timestamp : \DateTime::createFromFormat(self::UNIX_FORMAT, $timestamp);
$start = strtotime('first day of ' . $timestamp->format(self::DATE_TIME_FORMAT_PRETTY));
$end = strtotime('last day of ' . $timestamp->format(self::DATE_TIME_FORMAT_PRETTY));
$end = strtotime('last day of ' . $timestamp->format(self::DATE_TIME_FORMAT_PRETTY));

// Used with pow(2, X) so pow(2, 4) is THURSDAY
$weekdays = array_flip(array_keys($this->weekdays));
Expand Down

0 comments on commit 4000d5e

Please sign in to comment.