*/ declare(strict_types = 1); /** * Provides lists for categorizing misspelled sizes. */ final class MDConcWeights implements MDImporterConcordanceListInterface { private const WEIGHTS_LIST = [ "cm" => "", // Default "Gramm" => "g", ]; /** * Require a function for getting the concordance target. * * @param string $input Input string. * * @return string */ public static function getConcordanceTarget(string $input):string { if (!isset(self::WEIGHTS_LIST[$input])) { throw new MDImporterMissingConcordance("Unknown weight type: " . $input); } return self::WEIGHTS_LIST[$input]; } }