Skip to content

Commit

Permalink
chore: fabbot
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Sep 25, 2024
1 parent c5258c9 commit 1309032
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Translator/src/Intl/ErrorKind.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/error.ts#L9-L77.
*
* @experimental
*
* @internal
*/
final class ErrorKind
Expand Down
7 changes: 4 additions & 3 deletions src/Translator/src/Intl/IntlMessageParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/parser.ts.
*
* @experimental
*
* @internal
*/
final class IntlMessageParser
Expand Down Expand Up @@ -891,7 +892,7 @@ private function char(): int

$code = $this->message->codePointsAt($offset)[0] ?? null;
if (null === $code) {
throw new \Exception("Offset {$offset} is at invalid UTF-16 code unit boundary");
throw new \Exception("Offset {$offset} is at invalid UTF-16 code unit boundary.");
}

return $code;
Expand Down Expand Up @@ -979,7 +980,7 @@ private function bumpUntil(string $pattern): bool
private function bumpTo(int $targetOffset)
{
if ($this->position->offset > $targetOffset) {
throw new \Exception(\sprintf('targetOffset %s must be greater than or equal to the current offset %d', $targetOffset, $this->position->offset));
throw new \Exception(\sprintf('targetOffset "%s" must be greater than or equal to the current offset %d', $targetOffset, $this->position->offset));
}

$targetOffset = min($targetOffset, $this->messageLength);
Expand All @@ -989,7 +990,7 @@ private function bumpTo(int $targetOffset)
break;
}
if ($offset > $targetOffset) {
throw new \Exception("targetOffset {$targetOffset} is at invalid UTF-16 code unit boundary");
throw new \Exception("targetOffset {$targetOffset} is at invalid UTF-16 code unit boundary.");
}

$this->bump();
Expand Down
1 change: 1 addition & 0 deletions src/Translator/src/Intl/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/types.ts#L58-L61.
*
* @experimental
*
* @internal
*/
final class Location
Expand Down
1 change: 1 addition & 0 deletions src/Translator/src/Intl/Position.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/types.ts#L53-L57.
*
* @experimental
*
* @internal
*/
final class Position
Expand Down
1 change: 1 addition & 0 deletions src/Translator/src/Intl/SkeletonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/types.ts#L48-L51.
*
* @experimental
*
* @internal
*/
final class SkeletonType
Expand Down
1 change: 1 addition & 0 deletions src/Translator/src/Intl/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/types.ts#L8-L46.
*
* @experimental
*
* @internal
*/
final class Type
Expand Down
1 change: 1 addition & 0 deletions src/Translator/src/Intl/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

/**
* @experimental
*
* @internal
*/
final class Utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Hugo Alliaume <hugo@alliau.me>
*
* @experimental
*
* @internal
*/
interface ExtractorInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @author Hugo Alliaume <hugo@alliau.me>
*
* @experimental
*
* @internal
*/
final class IntlMessageParametersExtractor implements ExtractorInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Hugo Alliaume <hugo@alliau.me>
*
* @experimental
*
* @internal
*/
final class MessageParametersExtractor implements ExtractorInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Hugo Alliaume <hugo@alliau.me>
*
* @experimental
*
* @internal
*/
final class TypeScriptMessageParametersPrinter
Expand Down

0 comments on commit 1309032

Please # to comment.