Repository: symfony/symfony
File: src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php (PHP)

Code before:
{
    private const DENYLIST = [
        'XBA' => true, // European Composite Unit
        'XBB' => true, // European Monetary Unit
        'XBC' => true, // European Unit of Account (XBC)
        'XBD' => true, // European Unit of Account (XBD)
        'XUA' => true, // ADB Unit of Account
        'XAU' => true, // Gold
        'XAG' => true, // Silver
        'XPT' => true, // Platinum
        'XPD' => true, // Palladium
        'XSU' => true, // Sucre
        'XDR' => true, // Special Drawing Rights
        'XTS' => true, // Testing Currency Code
        'XXX' => true, // Unknown Currency
    ];

    /**
     * Collects all available currency codes.
     *
     * @var string[]
     */
    private array $currencyCodes = [];

    /**
     * Decode ICU "date pair" into a DateTimeImmutable (UTC).
     *
     * ICU stores UDate = milliseconds since 1970-01-01T00:00:00Z in a signed 64-bit.
     *
     * @param array{0: int, 1: int} $pair
     *
     * @return non-empty-string
     */
    private static function icuPairToDate(array $pair): string
    {
        [$highBits32, $lowBits32] = $pair;

        // Recompose a 64-bit unsigned integer from two 32-bit chunks.
        $unsigned64 = ((($highBits32 & 0xFFFFFFFF) << 32) | ($lowBits32 & 0xFFFFFFFF));

        // Convert to signed 64-bit (two's complement) if sign bit is set.
        if ($unsigned64 >= (1 << 63)) {
            $unsigned64 -= (1 << 64);
        }

        // Split into seconds and milliseconds.
        $seconds = intdiv($unsigned64, 1000);
        $millisecondsRemainder = $unsigned64 - $seconds * 1000;

        // Normalize negative millisecond remainders (e.g., for pre-1970 values)
        if (0 > $millisecondsRemainder) {

Review comment (suggestion):
```suggestion
     * Decodes ICU "date pair" into a DateTimeImmutable (UTC).
```

Code after:
{
    private const DENYLIST = [
        'XBA' => true, // European Composite Unit
        'XBB' => true, // European Monetary Unit
        'XBC' => true, // European Unit of Account (XBC)
        'XBD' => true, // European Unit of Account (XBD)
        'XUA' => true, // ADB Unit of Account
        'XAU' => true, // Gold
        'XAG' => true, // Silver
        'XPT' => true, // Platinum
        'XPD' => true, // Palladium
        'XSU' => true, // Sucre
        'XDR' => true, // Special Drawing Rights
        'XTS' => true, // Testing Currency Code
        'XXX' => true, // Unknown Currency
    ];

    /**
     * Collects all available currency codes.
     *
     * @var string[]
     */
    private array $currencyCodes = [];

    protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
    {
        return $scanner->scanLocales($sourceDir.'/curr');
    }

    protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
    {
        $compiler->compile($sourceDir.'/curr', $tempDir);
        $compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir);
    }

    protected function preGenerate(): void
    {
        $this->currencyCodes = [];
    }

    protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
    {
        $localeBundle = $reader->read($tempDir, $displayLocale);

        if (isset($localeBundle['Currencies']) && null !== $localeBundle['Currencies']) {
            $data = [
                'Names' => $this->generateSymbolNamePairs($localeBundle),
            ];

            $this->currencyCodes = array_merge($this->currencyCodes, array_keys($data['Names']));