public static function phpTypeHintingToPhpTypeDeclaration(string $phpTypeHint): string
  {
    $phpType = '';

    switch ($phpTypeHint)
    {
      case 'array':
      case 'array[]':
      case 'bool':
      case 'float':
      case 'int':
      case 'string':
      case 'void':
        $phpType = $phpTypeHint;
        break;

      default:
        $parts = explode('|', $phpTypeHint);
        $key   = array_search('null', $parts);
        if (count($parts)==2 && $key!==false)
        {
          unset($parts[$key]);

          $tmp = static::phpTypeHintingToPhpTypeDeclaration(implode('|', $parts));
          if ($tmp!=='')
          {
            $phpType = '?'.$tmp;
          }
        }
    }

    return $phpType;
  }