public function unformatPresenterClass(string $class): ?string
    {
        $presenter = array_search($class, $this->presenterMapping, true);
        if ($presenter !== false) {
            return (string) $presenter;
        }

        foreach ($this->moduleMapping as $module => $mapping) {
            $mapping = str_replace(['\\', '*'], ['\\\\', '(\w+)'], $mapping);
            $matches = Strings::match($class, "#^\\\\?$mapping[0]((?:$mapping[1])*)$mapping[2]\\z#i");
            if ($matches !== null) {
                return ($module === '' ? '' : $module . ':') . Strings::replace($matches[1], "#$mapping[1]#iA", '$1:') . $matches[3];
            }
        }

        return null;
    }