Skip to content

Commit

Permalink
Merge pull request #594 from phil-davis/grammar-20220926
Browse files Browse the repository at this point in the history
Adjust some grammar
  • Loading branch information
phil-davis committed Sep 26, 2022
2 parents 7c585e6 + 9531bcb commit bc48391
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ ChangeLog
* Updated: Windows timezone mapping to latest version from unicode.org
* Changed: The timezone maps are now loaded in from external files, in
lib/Sabre/VObject/timezonedata.
* Added: Fixing badly encoded URL's from google contacts vcards.
* Added: Fixing badly encoded URL's from Google contacts vcards.
* Fixed: Issue #68. Couldn't decode properties ending in a colon.
* Fixed: Issue #72. RecurrenceIterator should respect timezone in the UNTIL
clause.
Expand Down Expand Up @@ -656,7 +656,7 @@ ChangeLog
* Added: Utility to convert between 2.1, 3.0 and 4.0 vCards.
* Added: You can now add() multiple parameters to a property in one call.
* Added: Parameter::has() for easily checking if a parameter value exists.
* Added: VCard::preferred() to find a preferred email, phone number, etc for a
* Added: VCard::preferred() to find a preferred email, phone number, etc. for a
contact.
* Changed: All $duration properties are now public.
* Added: A few validators for iCalendar documents.
Expand Down Expand Up @@ -853,7 +853,7 @@ ChangeLog
------------------

* Fixed: Microsoft re-uses their magic numbers for different timezones,
specifically id 2 for both Sarajevo and Lisbon). A workaround was added to
(specifically id 2 for both Sarajevo and Lisbon). A workaround was added to
deal with this.


Expand Down
4 changes: 2 additions & 2 deletions bin/generate_vcards
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
4 changes: 2 additions & 2 deletions bin/mergeduplicates.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. We have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__.'/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__.'/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
4 changes: 2 additions & 2 deletions bin/vobject
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. We have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
2 changes: 1 addition & 1 deletion lib/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function createComponent(string $name, ?array $children = null, bool $def
* Parameter objects.
*
* @param mixed $value
* @param string|null $valueType Force a specific valuetype, such as URI or TEXT
* @param string|null $valueType Force a specific valueType, such as URI or TEXT
*
* @throws InvalidDataException
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function parse($input = null, int $options = 0): ?Document
}
}

// Resetting the input so we can throw an feof exception the next time.
// Resetting the input so that we can throw an feof exception the next time.
$this->input = null;

return $this->root;
Expand Down
20 changes: 10 additions & 10 deletions lib/Parser/MimeDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ protected function readProperty(string $line)
* vCard 2.1 says:
* * Semi-colons must be escaped in some property values, specifically
* ADR, ORG and N.
* * Semi-colons must be escaped in parameter values, because semi-colons
* * Semi-colons must be escaped in parameter values, because semicolons
* are also use to separate values.
* * No mention of escaping backslashes with another backslash.
* * newlines are not escaped either, instead QUOTED-PRINTABLE is used to
Expand All @@ -509,21 +509,21 @@ protected function readProperty(string $line)
* * (rfc2425) Backslashes, newlines (\n or \N) and comma's must be
* escaped, all the time.
* * Commas are used for delimiters in multiple values
* * (rfc2426) Adds to this that the semi-colon MUST also be escaped,
* as in some properties semi-colon is used for separators.
* * (rfc2426) Adds to this that the semicolon MUST also be escaped,
* as in some properties semicolon is used for separators.
* * Properties using semi-colons: N, ADR, GEO, ORG
* * Both ADR and N's individual parts may be broken up further with a
* comma.
* * Properties using commas: NICKNAME, CATEGORIES
*
* vCard 4.0 (rfc6350) says:
* * Commas must be escaped.
* * Semi-colons may be escaped, an unescaped semi-colon _may_ be a
* * Semi-colons may be escaped, an unescaped semicolon _may_ be a
* delimiter, depending on the property.
* * Backslashes must be escaped
* * Newlines must be escaped as either \N or \n.
* * Some compound properties may contain multiple parts themselves, so a
* comma within a semi-colon delimited property may also be unescaped
* comma within a semicolon delimited property may also be unescaped
* to denote multiple parts _within_ the compound property.
* * Text-properties using semi-colons: N, ADR, ORG, CLIENTPIDMAP.
* * Text-properties using commas: NICKNAME, RELATED, CATEGORIES, PID.
Expand All @@ -532,7 +532,7 @@ protected function readProperty(string $line)
* example for GEO in Section 6.5.2 seems to violate this.
*
* iCalendar 2.0 (rfc5545) says:
* * Commas or semi-colons may be used as delimiters, depending on the
* * Commas or semicolons may be used as delimiters, depending on the
* property.
* * Commas, semi-colons, backslashes, newline (\N or \n) are always
* escaped, unless they are delimiters.
Expand All @@ -547,7 +547,7 @@ protected function readProperty(string $line)
* Now for the parameters
*
* If delimiter is not set (empty string) this method will just return a string.
* If it's a comma or a semi-colon the string will be split on those
* If it's a comma or a semicolon the string will be split on those
* characters, and always return an array.
*
* @return string|string[]
Expand Down Expand Up @@ -602,11 +602,11 @@ public static function unescapeValue(string $input, string $delimiter = ';')
* * Does not mention a mechanism for this. In addition, double quotes
* are never used to wrap values.
* * This means that parameters can simply not contain colons or
* semi-colons.
* semicolons.
*
* vCard 3.0 (rfc2425, rfc2426):
* * Parameters _may_ be surrounded by double quotes.
* * If this is not the case, semi-colon, colon and comma may simply not
* * If this is not the case, semicolon, colon and comma may simply not
* occur (the comma used for multiple parameter values though).
* * If it is surrounded by double-quotes, it may simply not contain
* double-quotes.
Expand Down Expand Up @@ -678,7 +678,7 @@ private function extractQuotedPrintableValue(): string
// like unfolding, but we keep the newline.
$value = str_replace("\n ", "\n", $value);

// Microsoft products don't always correctly fold lines, they may be
// Microsoft's products don't always correctly fold lines, they may be
// missing a whitespace. So if 'forgiving' is turned on, we will take
// those as well.
if ($this->options & self::OPTION_FORGIVING) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function jsonSerialize(): array
}

/**
* Hydrate data from a XML subtree, as it would appear in a xCard or xCal
* Hydrate data from an XML subtree, as it would appear in a xCard or xCal
* object.
*
* @throws InvalidDataException
Expand Down Expand Up @@ -353,7 +353,7 @@ protected function xmlSerializeValue(Xml\Writer $writer): void
*
* If the property only had a single value, you will get just that. In the
* case the property had multiple values, the contents will be escaped and
* combined with ,.
* combined with comma.
*/
public function __toString(): string
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getValueType(): string
}

/**
* Hydrate data from a XML subtree, as it would appear in a xCard or xCal
* Hydrate data from an XML subtree, as it would appear in a xCard or xCal
* object.
*/
public function setXmlValue(array $value): void
Expand Down
10 changes: 5 additions & 5 deletions lib/Property/FlatText.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
* This object represents certain TEXT values.
*
* Specifically, this property is used for text values where there is only 1
* part. Semi-colons and colons will be de-escaped when deserializing, but if
* any semi-colons or commas appear without a backslash, we will not assume
* part. Semicolons and colons will be de-escaped when deserializing, but if
* any semicolons or commas appear without a backslash, we will not assume
* that they are delimiters.
*
* vCard 2.1 specifically has a whole bunch of properties where this may
* vCard 2.1 specifically has a bunch of properties where this may
* happen, as it only defines a delimiter for a few properties.
*
* vCard 4.0 states something similar. An unescaped semi-colon _may_ be a
* vCard 4.0 states something similar. An unescaped semicolon _may_ be a
* delimiter, depending on the property.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
Expand All @@ -34,7 +34,7 @@ class FlatText extends Text
/**
* Sets the value as a quoted-printable encoded string.
*
* Overriding this so we're not splitting on a ; delimiter.
* Overriding this so that we're not splitting on a semicolon delimiter.
*
* @throws InvalidDataException
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/FloatValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getJsonValue(): array
}

/**
* Hydrate data from a XML subtree, as it would appear in a xCard or xCal
* Hydrate data from an XML subtree, as it would appear in a xCard or xCal
* object.
*/
public function setXmlValue(array $value): void
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/IntegerValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getJsonValue(): array
}

/**
* Hydrate data from a XML subtree, as it would appear in a xCard or xCal
* Hydrate data from an XML subtree, as it would appear in a xCard or xCal
* object.
*/
public function setXmlValue(array $value): void
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function __construct(Component $root, string $name, $value = null, array
// 1. multivalue properties.
// 2. structured value properties
//
// The former is always separated by a comma, the latter by semi-colon.
// The former is always separated by a comma, the latter by semicolon.
if (in_array($name, $this->structuredValues)) {
$this->delimiter = ';';
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Time.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function getJsonValue(): array
}

/**
* Hydrate data from a XML subtree, as it would appear in a xCard or xCal
* Hydrate data from an XML subtree, as it would appear in a xCard or xCal
* object.
*/
public function setXmlValue(array $value): void
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function parameters(): array
public function setRawMimeDirValue(string $val): void
{
// Normally we don't need to do any type of unescaping for these
// properties, however.. we've noticed that Google Contacts
// properties, however, we've noticed that Google Contacts
// specifically escapes the colon (:) with a backslash. While I have
// no clue why they thought that was a good idea, I'm unescaping it
// anyway.
Expand Down
2 changes: 1 addition & 1 deletion lib/Splitter/ICalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ICalendar implements SplitterInterface
/**
* Constructor.
*
* The splitter should receive an readable file stream as its input.
* The splitter should receive a readable file stream as its input.
*
* @param resource $input
* @param int $options parser options, see the OPTIONS constants
Expand Down
2 changes: 1 addition & 1 deletion lib/TimezoneGuesser/FindFromTimezoneIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function find(string $tzid, ?bool $failIfUncertain = false): ?DateTimeZon
// https://bugs.php.net/bug.php?id=67881
//
// That's why we're checking if we'll be able to successfully instantiate
// \DateTimeZone() before doing so. Otherwise we could simply instantiate
// \DateTimeZone() before doing so. Otherwise, we could simply instantiate
// and catch the exception.
$tzIdentifiers = DateTimeZone::listIdentifiers();

Expand Down
2 changes: 1 addition & 1 deletion lib/VCardConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ protected function convertProperty(Component\VCard $input, Component\VCard $outp

// Lastly, we need to see if there's a need for a VALUE parameter.
//
// We can do that by instantiating a empty property with that name, and
// We can do that by instantiating an empty property with that name, and
// seeing if the default valueType is identical to the current one.
$tempProperty = $output->createProperty($newProperty->name);
if ($tempProperty->getValueType() !== $newProperty->getValueType()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/timezonedata/lotuszones.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// 'Mid-Atlantic' => 'Etc/GMT-2', // conflict with windows timezones.
'Azores' => 'Atlantic/Azores',
'Cape Verde' => 'Atlantic/Cape_Verde',
'Greenwich' => 'Atlantic/Reykjavik', // No I'm serious.. Greenwich is not GMT.
'Greenwich' => 'Atlantic/Reykjavik', // No I'm serious. Greenwich is not GMT.
'Morocco' => 'Africa/Casablanca',
'Central Europe' => 'Europe/Prague',
'Central European' => 'Europe/Sarajevo',
Expand Down
4 changes: 2 additions & 2 deletions tests/VObject/Component/VTodoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function testValidateInvalid(): void
], $messages);
}

public function testValidateDUEDTSTARTMisMatch(): void
public function testValidateDueDateTimeStartMisMatch(): void
{
$input = <<<HI
BEGIN:VCALENDAR
Expand Down Expand Up @@ -141,7 +141,7 @@ public function testValidateDUEDTSTARTMisMatch(): void
], $messages);
}

public function testValidateDUEbeforeDTSTART(): void
public function testValidateDueBeforeDateTimeStart(): void
{
$input = <<<HI
BEGIN:VCALENDAR
Expand Down
10 changes: 5 additions & 5 deletions tests/VObject/FreeBusyGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ public function testTentative(): void
}

/**
* Testing an event that falls outside of the report time-range.
* Testing an event that falls outside the report time-range.
*/
public function testOutsideTimeRange(): void
{
// outside of time-range, hidden
// outside time-range, hidden
$blob = <<<ICS
BEGIN:VCALENDAR
BEGIN:VEVENT
Expand All @@ -234,11 +234,11 @@ public function testOutsideTimeRange(): void
}

/**
* Testing an event that falls outside of the report time-range.
* Testing an event that falls outside the report time-range.
*/
public function testOutsideTimeRange2(): void
{
// outside of time-range, hidden
// outside time-range, hidden
$blob = <<<ICS
BEGIN:VCALENDAR
BEGIN:VEVENT
Expand Down Expand Up @@ -447,7 +447,7 @@ public function testFloatingTimeReferenceTimeZone(): void

public function testAllDay2(): void
{
// All-day event, slightly outside of the VFREEBUSY range.
// All-day event, slightly outside the VFREEBUSY range.
$blob = <<<ICS
BEGIN:VCALENDAR
BEGIN:VEVENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Sabre\VObject\Reader;

/**
* This is a unittest for Issue #53.
* This is a unit test for Issue #53.
*/
class HandleRDateExpandTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/VObject/Recur/EventIterator/IncorrectExpandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Sabre\VObject\Reader;

/**
* This is a unittest for Issue #53.
* This is a unit test for Issue #53.
*/
class IncorrectExpandTest extends TestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public function testZeroInterval(): void
$it = new Recur\EventIterator($this->vcal, 'uuid');
$it->fastForward(new DateTimeImmutable('2013-01-01 23:00:00', new DateTimeZone('UTC')));

// if we got this far.. it means we are no longer infinitely looping
// if we got this far it means we are no longer infinitely looping
}
}

0 comments on commit bc48391

Please sign in to comment.