From 0fec2b0c475f9318353b4a9c50441470397f6da4 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 14 Jan 2020 15:42:20 +0545 Subject: [PATCH] Fix various typos --- lib/Cli.php | 4 ++-- lib/Component.php | 2 +- lib/Component/VEvent.php | 2 +- lib/PHPUnitAssertions.php | 2 +- lib/Parser/MimeDir.php | 4 ++-- lib/Parser/XML/Element/KeyValue.php | 2 +- lib/Property/Boolean.php | 2 +- lib/Property/IntegerValue.php | 2 +- lib/Property/Text.php | 2 +- lib/Property/Uri.php | 2 +- lib/Recur/NoInstancesException.php | 2 +- lib/Recur/RRuleIterator.php | 6 +++--- lib/Settings.php | 2 +- lib/TimeZoneUtil.php | 2 +- lib/VCardConverter.php | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/Cli.php b/lib/Cli.php index 8350719a4..be795e9e2 100644 --- a/lib/Cli.php +++ b/lib/Cli.php @@ -29,7 +29,7 @@ class Cli protected $showHelp = false; /** - * Wether to spit out 'mimedir' or 'json' format. + * Whether to spit out 'mimedir' or 'json' format. * * @var string */ @@ -516,7 +516,7 @@ protected function serializeComponent(Component $vObj) * * A higher score means the item will be lower in the list. * To avoid score collisions, each "score category" has a reasonable - * space to accomodate elements. The $key is added to the $score to + * space to accommodate elements. The $key is added to the $score to * preserve the original relative order of elements. * * @param int $key diff --git a/lib/Component.php b/lib/Component.php index a33b7d577..d4d8506d8 100644 --- a/lib/Component.php +++ b/lib/Component.php @@ -276,7 +276,7 @@ public function serialize() * * A higher score means the item will be lower in the list. * To avoid score collisions, each "score category" has a reasonable - * space to accomodate elements. The $key is added to the $score to + * space to accommodate elements. The $key is added to the $score to * preserve the original relative order of elements. * * @param int $key diff --git a/lib/Component/VEvent.php b/lib/Component/VEvent.php index 09f37033c..4a53a7561 100644 --- a/lib/Component/VEvent.php +++ b/lib/Component/VEvent.php @@ -36,7 +36,7 @@ public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) try { $it = new EventIterator($this, null, $start->getTimezone()); } catch (NoInstancesException $e) { - // If we've catched this exception, there are no instances + // If we've caught this exception, there are no instances // for the event that fall into the specified time-range. return false; } diff --git a/lib/PHPUnitAssertions.php b/lib/PHPUnitAssertions.php index 635988387..45c0a21c6 100644 --- a/lib/PHPUnitAssertions.php +++ b/lib/PHPUnitAssertions.php @@ -15,7 +15,7 @@ trait PHPUnitAssertions { /** - * This method tests wether two vcards or icalendar objects are + * This method tests whether two vcards or icalendar objects are * semantically identical. * * It supports objects being supplied as strings, streams or diff --git a/lib/Parser/MimeDir.php b/lib/Parser/MimeDir.php index 26a7101e5..ea5ac0326 100644 --- a/lib/Parser/MimeDir.php +++ b/lib/Parser/MimeDir.php @@ -124,7 +124,7 @@ public function setInput($input) $this->startLine = 0; if (is_string($input)) { - // Convering to a stream. + // Converting to a stream. $stream = fopen('php://temp', 'r+'); fwrite($stream, $input); rewind($stream); @@ -480,7 +480,7 @@ protected function readProperty($line) * vCard 3.0 says: * * (rfc2425) Backslashes, newlines (\n or \N) and comma's must be * escaped, all time time. - * * Comma's are used for delimeters in multiple values + * * Comma's are used for delimiters in multiple values * * (rfc2426) Adds to to this that the semi-colon MUST also be escaped, * as in some properties semi-colon is used for separators. * * Properties using semi-colons: N, ADR, GEO, ORG diff --git a/lib/Parser/XML/Element/KeyValue.php b/lib/Parser/XML/Element/KeyValue.php index e26540036..c0bbf0d9b 100644 --- a/lib/Parser/XML/Element/KeyValue.php +++ b/lib/Parser/XML/Element/KeyValue.php @@ -18,7 +18,7 @@ class KeyValue extends SabreXml\Element\KeyValue /** * The deserialize method is called during xml parsing. * - * This method is called staticly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/lib/Property/Boolean.php b/lib/Property/Boolean.php index 1b219bb8c..0e7bc666e 100644 --- a/lib/Property/Boolean.php +++ b/lib/Property/Boolean.php @@ -8,7 +8,7 @@ /** * Boolean property. * - * This object represents BOOLEAN values. These are always the case-insenstive + * This object represents BOOLEAN values. These are always the case-insensitive * string TRUE or FALSE. * * Automatic conversion to PHP's true and false are done. diff --git a/lib/Property/IntegerValue.php b/lib/Property/IntegerValue.php index ddd71d731..24a46fb07 100644 --- a/lib/Property/IntegerValue.php +++ b/lib/Property/IntegerValue.php @@ -9,7 +9,7 @@ * Integer property. * * This object represents INTEGER values. These are always a single integer. - * They may be preceeded by either + or -. + * They may be preceded by either + or -. * * @copyright Copyright (C) fruux GmbH (https://fruux.com/) * @author Evert Pot (http://evertpot.com/) diff --git a/lib/Property/Text.php b/lib/Property/Text.php index 23c945551..ac8aa066b 100644 --- a/lib/Property/Text.php +++ b/lib/Property/Text.php @@ -111,7 +111,7 @@ public function setQuotedPrintableValue($val) // that. // // We also don't have to unescape \\, so all we need to look for is a ; - // that's not preceeded with a \. + // that's not preceded with a \. $regex = '# (?setValue($matches); diff --git a/lib/Property/Uri.php b/lib/Property/Uri.php index 3449ba1f2..830cd3f18 100644 --- a/lib/Property/Uri.php +++ b/lib/Property/Uri.php @@ -72,7 +72,7 @@ public function setRawMimeDirValue($val) { // Normally we don't need to do any type of unescaping for these // properties, however.. we've noticed that Google Contacts - // specifically escapes the colon (:) with a blackslash. While I have + // 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. // diff --git a/lib/Recur/NoInstancesException.php b/lib/Recur/NoInstancesException.php index b55af567d..348c02306 100644 --- a/lib/Recur/NoInstancesException.php +++ b/lib/Recur/NoInstancesException.php @@ -7,7 +7,7 @@ /** * This exception gets thrown when a recurrence iterator produces 0 instances. * - * This may happen when every occurence in a rrule is also in EXDATE. + * This may happen when every occurrence in a rrule is also in EXDATE. * * @copyright Copyright (C) fruux GmbH (https://fruux.com/) * @author Evert Pot (http://evertpot.com/) diff --git a/lib/Recur/RRuleIterator.php b/lib/Recur/RRuleIterator.php index 75342a2a8..7bd4b086e 100644 --- a/lib/Recur/RRuleIterator.php +++ b/lib/Recur/RRuleIterator.php @@ -232,7 +232,7 @@ public function fastForward(DateTimeInterface $dt) * * This is an array of weekdays * - * This may also be preceeded by a positive or negative integer. If present, + * This may also be preceded by a positive or negative integer. If present, * this indicates the nth occurrence of a specific day within the monthly or * yearly rrule. For instance, -2TU indicates the second-last tuesday of * the month, or year. @@ -771,7 +771,7 @@ protected function parseRRule($rrule) $this->byMonth = (array) $value; foreach ($this->byMonth as $byMonth) { if (!is_numeric($byMonth) || (int) $byMonth < 1 || (int) $byMonth > 12) { - throw new InvalidDataException('BYMONTH in RRULE must have value(s) betweeen 1 and 12!'); + throw new InvalidDataException('BYMONTH in RRULE must have value(s) between 1 and 12!'); } } break; @@ -948,7 +948,7 @@ protected function getDays() { $recurrenceDays = []; foreach ($this->byDay as $byDay) { - // The day may be preceeded with a positive (+n) or + // The day may be preceded with a positive (+n) or // negative (-n) integer. However, this does not make // sense in 'weekly' so we ignore it here. $recurrenceDays[] = $this->dayMap[substr($byDay, -2)]; diff --git a/lib/Settings.php b/lib/Settings.php index afc586b0c..b0bb80a82 100644 --- a/lib/Settings.php +++ b/lib/Settings.php @@ -46,7 +46,7 @@ class Settings * specific events that recur many, many times, potentially DDOSing the * server. * - * The default (3500) allows creation of a dialy event that goes on for 10 + * The default (3500) allows creation of a daily event that goes on for 10 * years, which is hopefully long enough for most. * * Set this value to -1 to disable this control altogether. diff --git a/lib/TimeZoneUtil.php b/lib/TimeZoneUtil.php index 5b1a775c2..2c407fee6 100644 --- a/lib/TimeZoneUtil.php +++ b/lib/TimeZoneUtil.php @@ -139,7 +139,7 @@ public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUn // PHP has a bug that logs PHP warnings even it shouldn't: // https://bugs.php.net/bug.php?id=67881 // - // That's why we're checking if we'll be able to successfull instantiate + // That's why we're checking if we'll be able to successfully instantiate // \DateTimeZone() before doing so. Otherwise we could simply instantiate // and catch the exception. $tzIdentifiers = \DateTimeZone::listIdentifiers(); diff --git a/lib/VCardConverter.php b/lib/VCardConverter.php index bc80abee9..5a814aa2e 100644 --- a/lib/VCardConverter.php +++ b/lib/VCardConverter.php @@ -230,7 +230,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 instantating a empty property with that name, and + // We can do that by instantiating a 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()) {