private function convertErrorConstants(string $expression): string
    {
        $output = preg_replace_callback('/(E_[a-zA-Z_]+)/', function ($errorConstant) {
            if (defined($errorConstant[1])) {
                return constant($errorConstant[1]);
            }

            return $errorConstant[0];
        }, $expression);

        if (null === $output) {
            throw new \InvalidArgumentException('Unable to parse error types string: ' . $expression);
        }

        return $output;
    }