<?php
declare(strict_types=1);

function mocker_promo_normalize_code(string $raw): string
{
    $s = strtoupper(preg_replace('/\s+/u', '', $raw) ?? '');
    $s = preg_replace('/[^A-Z0-9\-]/', '', $s) ?? '';

    return $s;
}
