Skip to content

Commit

Permalink
Consider implementing X-MICROSOFT-CDO-BUSYSTATUS markuspoerschke#32
Browse files Browse the repository at this point in the history
  • Loading branch information
puhr-mde committed Dec 3, 2019
1 parent aea8494 commit 129e94e
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 48 deletions.
1 change: 0 additions & 1 deletion src/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ private function buildComponents(array &$lines)
}

/**
* @param array $lines
* @param Component $component
*/
private function addComponentLines(array &$lines, self $component)
Expand Down
2 changes: 0 additions & 2 deletions src/Component/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ public function buildPropertyBag()
*
* @see Eluceo\iCal::addComponent
* @deprecated Please, use public method addComponent() from abstract Component class
*
* @param Event $event
*/
public function addEvent(Event $event)
{
Expand Down
22 changes: 1 addition & 21 deletions src/Component/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,7 @@ public function setLocation($location, $title = '', $geo = null)
$geo = Geo::fromString($geo);
} elseif (!is_null($geo) && !$geo instanceof Geo) {
$className = get_class($geo);
throw new \InvalidArgumentException(
"The parameter 'geo' must be a string or an instance of " . Geo::class
. " but an instance of {$className} was given."
);
throw new \InvalidArgumentException("The parameter 'geo' must be a string or an instance of " . Geo::class . " but an instance of {$className} was given.");
}

$this->location = $location;
Expand All @@ -474,8 +471,6 @@ public function setLocation($location, $title = '', $geo = null)
}

/**
* @param Geo $geoProperty
*
* @return $this
*/
public function setGeoLocation(Geo $geoProperty)
Expand Down Expand Up @@ -549,8 +544,6 @@ public function getSequence()
}

/**
* @param Organizer $organizer
*
* @return $this
*/
public function setOrganizer(Organizer $organizer)
Expand Down Expand Up @@ -645,8 +638,6 @@ public function getTimezoneString()
}

/**
* @param Attendees $attendees
*
* @return $this
*/
public function setAttendees(Attendees $attendees)
Expand Down Expand Up @@ -787,8 +778,6 @@ public function setStatus($status)
/**
* @deprecated Deprecated since version 0.11.0, to be removed in 1.0. Use addRecurrenceRule instead.
*
* @param RecurrenceRule $recurrenceRule
*
* @return $this
*/
public function setRecurrenceRule(RecurrenceRule $recurrenceRule)
Expand All @@ -813,8 +802,6 @@ public function getRecurrenceRule()
}

/**
* @param RecurrenceRule $recurrenceRule
*
* @return $this
*/
public function addRecurrenceRule(RecurrenceRule $recurrenceRule)
Expand Down Expand Up @@ -883,8 +870,6 @@ public function setIsPrivate($flag)
}

/**
* @param \DateTimeInterface $dateTime
*
* @return \Eluceo\iCal\Component\Event
*/
public function addExDate(\DateTimeInterface $dateTime)
Expand Down Expand Up @@ -923,8 +908,6 @@ public function getRecurrenceId()
}

/**
* @param RecurrenceId $recurrenceId
*
* @return \Eluceo\iCal\Component\Event
*/
public function setRecurrenceId(RecurrenceId $recurrenceId)
Expand Down Expand Up @@ -954,9 +937,6 @@ public function getAttachments()
return $this->attachments;
}

/**
* @param string $url
*/
public function addUrlAttachment(string $url)
{
$this->addAttachment(new Attachment($url));
Expand Down
4 changes: 0 additions & 4 deletions src/Component/TimezoneRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ public function setTzName($name)
}

/**
* @param \DateTimeInterface $dtStart
*
* @return $this
*/
public function setDtStart(\DateTimeInterface $dtStart)
Expand All @@ -150,8 +148,6 @@ public function setDtStart(\DateTimeInterface $dtStart)
}

/**
* @param RecurrenceRule $recurrenceRule
*
* @return $this
*/
public function setRecurrenceRule(RecurrenceRule $recurrenceRule)
Expand Down
12 changes: 2 additions & 10 deletions src/Property/Event/Geo.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ public function __construct(float $latitude, float $longitude)
$this->longitude = $longitude;

if ($this->latitude < -90 || $this->latitude > 90) {
throw new \InvalidArgumentException(
"The geographical latitude must be a value between -90 and 90 degrees. '{$this->latitude}' was given."
);
throw new \InvalidArgumentException("The geographical latitude must be a value between -90 and 90 degrees. '{$this->latitude}' was given.");
}

if ($this->longitude < -180 || $this->longitude > 180) {
throw new \InvalidArgumentException(
"The geographical longitude must be a value between -180 and 180 degrees. '{$this->longitude}' was given."
);
throw new \InvalidArgumentException("The geographical longitude must be a value between -180 and 180 degrees. '{$this->longitude}' was given.");
}

parent::__construct('GEO', new Property\RawStringValue($this->getGeoLocationAsString()));
Expand All @@ -53,8 +49,6 @@ public function __construct(float $latitude, float $longitude)
/**
* @deprecated This method is used to allow backwards compatibility for Event::setLocation
*
* @param string $geoLocationString
*
* @return Geo
*/
public static function fromString(string $geoLocationString): self
Expand All @@ -71,8 +65,6 @@ public static function fromString(string $geoLocationString): self
*
* @example 37.386013;-122.082932
*
* @param string $separator
*
* @return string
*/
public function getGeoLocationAsString(string $separator = ';'): string
Expand Down
2 changes: 0 additions & 2 deletions src/Property/Event/RecurrenceId.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ public function getDatetime()
}

/**
* @param \DateTimeInterface $dateTime
*
* @return \Eluceo\iCal\Property\Event\RecurrenceId
*/
public function setDatetime(\DateTimeInterface $dateTime)
Expand Down
4 changes: 0 additions & 4 deletions src/Property/Event/RecurrenceRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ public function getCount()
}

/**
* @param \DateTimeInterface|null $until
*
* @return $this
*/
public function setUntil(\DateTimeInterface $until = null)
Expand Down Expand Up @@ -466,8 +464,6 @@ public function setByMonthDay($day)
* Each BYDAY value can also be preceded by a positive (+n) or negative (-n) integer.
* If present, this indicates the nth occurrence of a specific day within the MONTHLY or YEARLY "RRULE".
*
* @param string $day
*
* @return $this
*/
public function setByDay(string $day)
Expand Down
4 changes: 0 additions & 4 deletions src/PropertyBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function set($name, $value, $params = [])
}

/**
* @param string $name
*
* @return Property|null
*/
public function get(string $name)
Expand All @@ -51,8 +49,6 @@ public function get(string $name)
/**
* Adds a Property. If Property already exists an Exception will be thrown.
*
* @param Property $property
*
* @return $this
*
* @throws \Exception
Expand Down

0 comments on commit 129e94e

Please sign in to comment.