$blockToItemId */ public function __construct(private array $blockToItemId){} public function lookupItemId(string $blockId) : ?string{ return $this->blockToItemId[$blockId] ?? null; } public function lookupBlockId(string $itemId) : ?string{ //we don't need this for any functionality, so we're not concerned about performance here //however, it might be nice to have for debugging $blockId = array_search($itemId, $this->blockToItemId, true); return $blockId !== false ? $blockId : null; } }