From 1309032a08b21073ad40722540c00c016735f1a2 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Wed, 25 Sep 2024 15:45:28 +0200 Subject: [PATCH] chore: fabbot --- src/Translator/src/Intl/ErrorKind.php | 1 + src/Translator/src/Intl/IntlMessageParser.php | 7 ++++--- src/Translator/src/Intl/Location.php | 1 + src/Translator/src/Intl/Position.php | 1 + src/Translator/src/Intl/SkeletonType.php | 1 + src/Translator/src/Intl/Type.php | 1 + src/Translator/src/Intl/Utils.php | 1 + .../src/MessageParameters/Extractor/ExtractorInterface.php | 1 + .../Extractor/IntlMessageParametersExtractor.php | 1 + .../Extractor/MessageParametersExtractor.php | 1 + .../Printer/TypeScriptMessageParametersPrinter.php | 1 + 11 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Translator/src/Intl/ErrorKind.php b/src/Translator/src/Intl/ErrorKind.php index 2bbafbd4e9..7324137f34 100644 --- a/src/Translator/src/Intl/ErrorKind.php +++ b/src/Translator/src/Intl/ErrorKind.php @@ -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 diff --git a/src/Translator/src/Intl/IntlMessageParser.php b/src/Translator/src/Intl/IntlMessageParser.php index 7231c509b0..6882774038 100644 --- a/src/Translator/src/Intl/IntlMessageParser.php +++ b/src/Translator/src/Intl/IntlMessageParser.php @@ -19,6 +19,7 @@ * Adapted from https://github.com/formatjs/formatjs/blob/590f1f81b26934c6dc7a55fff938df5436c6f158/packages/icu-messageformat-parser/parser.ts. * * @experimental + * * @internal */ final class IntlMessageParser @@ -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; @@ -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); @@ -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(); diff --git a/src/Translator/src/Intl/Location.php b/src/Translator/src/Intl/Location.php index b94efb53ab..1af9614506 100644 --- a/src/Translator/src/Intl/Location.php +++ b/src/Translator/src/Intl/Location.php @@ -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 diff --git a/src/Translator/src/Intl/Position.php b/src/Translator/src/Intl/Position.php index a6cbe807b7..f803db4a24 100644 --- a/src/Translator/src/Intl/Position.php +++ b/src/Translator/src/Intl/Position.php @@ -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 diff --git a/src/Translator/src/Intl/SkeletonType.php b/src/Translator/src/Intl/SkeletonType.php index fb224426a1..f3fb011338 100644 --- a/src/Translator/src/Intl/SkeletonType.php +++ b/src/Translator/src/Intl/SkeletonType.php @@ -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 diff --git a/src/Translator/src/Intl/Type.php b/src/Translator/src/Intl/Type.php index 15de7fe160..67fc3b0c6f 100644 --- a/src/Translator/src/Intl/Type.php +++ b/src/Translator/src/Intl/Type.php @@ -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 diff --git a/src/Translator/src/Intl/Utils.php b/src/Translator/src/Intl/Utils.php index 5690e45107..2f42fc3739 100644 --- a/src/Translator/src/Intl/Utils.php +++ b/src/Translator/src/Intl/Utils.php @@ -15,6 +15,7 @@ /** * @experimental + * * @internal */ final class Utils diff --git a/src/Translator/src/MessageParameters/Extractor/ExtractorInterface.php b/src/Translator/src/MessageParameters/Extractor/ExtractorInterface.php index 0e0349c856..277e253616 100644 --- a/src/Translator/src/MessageParameters/Extractor/ExtractorInterface.php +++ b/src/Translator/src/MessageParameters/Extractor/ExtractorInterface.php @@ -15,6 +15,7 @@ * @author Hugo Alliaume * * @experimental + * * @internal */ interface ExtractorInterface diff --git a/src/Translator/src/MessageParameters/Extractor/IntlMessageParametersExtractor.php b/src/Translator/src/MessageParameters/Extractor/IntlMessageParametersExtractor.php index 5d1107dfa0..4850d6fc49 100644 --- a/src/Translator/src/MessageParameters/Extractor/IntlMessageParametersExtractor.php +++ b/src/Translator/src/MessageParameters/Extractor/IntlMessageParametersExtractor.php @@ -18,6 +18,7 @@ * @author Hugo Alliaume * * @experimental + * * @internal */ final class IntlMessageParametersExtractor implements ExtractorInterface diff --git a/src/Translator/src/MessageParameters/Extractor/MessageParametersExtractor.php b/src/Translator/src/MessageParameters/Extractor/MessageParametersExtractor.php index 9395dd9a4a..7cbd5f20c2 100644 --- a/src/Translator/src/MessageParameters/Extractor/MessageParametersExtractor.php +++ b/src/Translator/src/MessageParameters/Extractor/MessageParametersExtractor.php @@ -15,6 +15,7 @@ * @author Hugo Alliaume * * @experimental + * * @internal */ final class MessageParametersExtractor implements ExtractorInterface diff --git a/src/Translator/src/MessageParameters/Printer/TypeScriptMessageParametersPrinter.php b/src/Translator/src/MessageParameters/Printer/TypeScriptMessageParametersPrinter.php index 1a227a0c0e..d4085f00f2 100644 --- a/src/Translator/src/MessageParameters/Printer/TypeScriptMessageParametersPrinter.php +++ b/src/Translator/src/MessageParameters/Printer/TypeScriptMessageParametersPrinter.php @@ -15,6 +15,7 @@ * @author Hugo Alliaume * * @experimental + * * @internal */ final class TypeScriptMessageParametersPrinter