From bef9568de95b910f79f7a8398184bb48d725c737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 23 Jun 2024 13:40:15 +0000 Subject: [PATCH] Fix typos --- CHANGELOG.md | 6 +++--- README.md | 2 +- src/RRule.php | 10 +++++----- src/RRuleInterface.php | 4 ++-- src/RRuleTrait.php | 2 +- src/RSet.php | 6 +++--- src/RfcParser.php | 4 ++-- tests/RRuleTest.php | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad8381..6b2fcb0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ ### Added -- Added Portugese translation [#108](https://github.com/rlanvin/php-rrule/pull/108) +- Added Portuguese translation [#108](https://github.com/rlanvin/php-rrule/pull/108) - Added Polish translation [#106](https://github.com/rlanvin/php-rrule/pull/106) ## [2.3.2] - 2022-05-03 @@ -114,7 +114,7 @@ ## [2.0.0-rc1] - 2019-01-13 -- Rewrite the core algorithm to use a native PHP generator, drop compability with PHP < 5.6 [#43](https://github.com/rlanvin/php-rrule/issues/43) +- Rewrite the core algorithm to use a native PHP generator, drop compatibility with PHP < 5.6 [#43](https://github.com/rlanvin/php-rrule/issues/43) ### Added @@ -228,7 +228,7 @@ ### Fixed -- `RRule::parseRfcString()` is strictier and will not accept invalid `DTSTART` and `UNTIL` formats (use the array syntax in the constructor with `DateTime` objects if you need to create rules with complex combinations of timezones). [#13](https://github.com/rlanvin/php-rrule/issues/13) +- `RRule::parseRfcString()` is stricter and will not accept invalid `DTSTART` and `UNTIL` formats (use the array syntax in the constructor with `DateTime` objects if you need to create rules with complex combinations of timezones). [#13](https://github.com/rlanvin/php-rrule/issues/13) ## [1.2.0] - 2016-04-09 diff --git a/README.md b/README.md index c1f2cfc..8b0189e 100755 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ you `lno1wkst`). I tried to comment and explain as much of the algorithm as poss in this PHP port, so feel free to check the code if you're interested. The lib differs from the python version in various aspects, notably in the -respect of the RFC. This version is a bit strictier and will not accept many +respect of the RFC. This version is a bit stricter and will not accept many non-compliant combinations of rule parts, that the python version otherwise accepts. There are also some additional features in this version. diff --git a/src/RRule.php b/src/RRule.php index 6602872..6804689 100755 --- a/src/RRule.php +++ b/src/RRule.php @@ -179,7 +179,7 @@ class RRule implements RRuleInterface /** * The constructor needs the entire rule at once. - * There is no setter after the class has been instanciated, + * There is no setter after the class has been instantiated, * because in order to validate some BYXXX parts, we need to know * the value of some other parts (FREQ or other BXXX parts). * @@ -562,7 +562,7 @@ class RRule implements RRuleInterface /** * Format a rule according to RFC 5545 * - * @param bool $include_timezone Wether to generate a rule with timezone identifier on DTSTART (and UNTIL) or not. + * @param bool $include_timezone Whether to generate a rule with timezone identifier on DTSTART (and UNTIL) or not. * @return string */ public function rfcString($include_timezone = true) @@ -721,7 +721,7 @@ class RRule implements RRuleInterface } /** - * Return true if the rrule has no end condition (infite) + * Return true if the rrule has no end condition (infinite) * * @return bool */ @@ -826,7 +826,7 @@ class RRule implements RRuleInterface } } - // so now we have exhausted all the BYXXX rules (exept bysetpos), + // so now we have exhausted all the BYXXX rules (except bysetpos), // we still need to consider frequency and interval list($start_year, $start_month) = explode('-',$this->dtstart->format('Y-m')); switch ($this->freq) { @@ -988,7 +988,7 @@ class RRule implements RRuleInterface /** * Returns the number of occurrences in this rule. It will have go * through the whole recurrence, if this hasn't been done before, which - * introduces a performance penality. + * introduces a performance penalty. * * @return int */ diff --git a/src/RRuleInterface.php b/src/RRuleInterface.php index b0a5a53..917d623 100755 --- a/src/RRuleInterface.php +++ b/src/RRuleInterface.php @@ -25,7 +25,7 @@ interface RRuleInterface extends \ArrayAccess, \Countable, \IteratorAggregate public function getOccurrences($limit = null); /** - * Return all the ocurrences after a date, before a date, or between two dates. + * Return all the occurrences after a date, before a date, or between two dates. * * @param mixed $begin Can be null to return all occurrences before $end * @param mixed $end Can be null to return all occurrences after $begin @@ -97,7 +97,7 @@ interface RRuleInterface extends \ArrayAccess, \Countable, \IteratorAggregate public function isFinite(); /** - * Return true if the rrule has no end condition (infite) + * Return true if the rrule has no end condition (infinite) * * @return bool */ diff --git a/src/RRuleTrait.php b/src/RRuleTrait.php index cc26403..71ed882 100755 --- a/src/RRuleTrait.php +++ b/src/RRuleTrait.php @@ -52,7 +52,7 @@ trait RRuleTrait } /** - * Return all the ocurrences after a date, before a date, or between two dates. + * Return all the occurrences after a date, before a date, or between two dates. * * @param mixed $begin Can be null to return all occurrences before $end * @param mixed $end Can be null to return all occurrences after $begin diff --git a/src/RSet.php b/src/RSet.php index 6a21793..2564563 100755 --- a/src/RSet.php +++ b/src/RSet.php @@ -202,7 +202,7 @@ class RSet implements RRuleInterface } /** - * Add a RDATE (renamed Date for simplicy, since we don't support full RDATE syntax at the moment) + * Add a RDATE (renamed Date for simplicity, since we don't support full RDATE syntax at the moment) * * @param mixed $date a valid date representation or a \DateTime object * @return $this @@ -382,7 +382,7 @@ class RSet implements RRuleInterface } /** - * Return true if the rrule has no end condition (infite) + * Return true if the rrule has no end condition (infinite) * * @return bool */ @@ -556,7 +556,7 @@ class RSet implements RRuleInterface /** * Returns the number of recurrences in this set. It will have go * through the whole recurrence, if this hasn't been done before, which - * introduces a performance penality. + * introduces a performance penalty. * @return int */ #[\ReturnTypeWillChange] diff --git a/src/RfcParser.php b/src/RfcParser.php index b0cf9f6..fc0cd48 100755 --- a/src/RfcParser.php +++ b/src/RfcParser.php @@ -64,7 +64,7 @@ class RfcParser /** * Parse both DTSTART and RRULE (and EXRULE). * - * It's impossible to accuratly parse a RRULE in isolation (without the DTSTART) + * It's impossible to accurately parse a RRULE in isolation (without the DTSTART) * as some tests depends on DTSTART (notably the date format for UNTIL). * * @param string $string The RFC-like string @@ -193,7 +193,7 @@ class RfcParser } // this is an invalid rule, however we'll support it since the JS lib is broken // see https://github.com/rlanvin/php-rrule/issues/25 - trigger_error("This string is not compliant with the RFC (DTSTART cannot be part of RRULE). It is accepted as is for compability reasons only.", E_USER_NOTICE); + trigger_error("This string is not compliant with the RFC (DTSTART cannot be part of RRULE). It is accepted as is for compatibility reasons only.", E_USER_NOTICE); } $parts[$key] = $value; } diff --git a/tests/RRuleTest.php b/tests/RRuleTest.php index 50e49ae..b360e85 100644 --- a/tests/RRuleTest.php +++ b/tests/RRuleTest.php @@ -2994,7 +2994,7 @@ class RRuleTest extends TestCase array('en_US.utf-8', array('en','en_US'), array('en','en_US')), array('en_US_POSIX', array('en','en_US'), array('en','en_US')), array('sv_SE', array('sv','sv_SE'), array('sv','sv_SE')), - // case insentitive + // case insensitive array('en_sg', array('en','en_SG'), array('en','en_SG')), array('sv_se', array('sv','sv_SE'), array('sv','sv_SE')), // with a dash @@ -3120,7 +3120,7 @@ class RRuleTest extends TestCase /** * Tests that the RRule::i18nLoad() fails as expected on invalid $fallback settings */ - public function testI18nLoadFallbackFailsWitoutIntl() + public function testI18nLoadFallbackFailsWithoutIntl() { $this->expectException(\InvalidArgumentException::class); $reflector = new ReflectionClass('RRule\RRule');