code: protected function quote(string $value): string
      {
          $path = \preg_quote($value, '()');
          $path = \strtr($path, [
              '\\(' => '(',
              '\\)' => ')',
              '\\<' => '<',
              '\\>' => '>',
          ]);
  
          return \str_replace(')', ')?', $path);
      }
docs: @param string $value
  
  @return string