code: public static function extractTypesFromDirectives(Directive $directive, array $typeMap = [])
      {
          if (is_array($directive->args)) {
              foreach ($directive->args as $arg) {
                  $typeMap = self::extractTypes($arg->getType(), $typeMap);
              }
          }
  
          return $typeMap;
      }
docs: @param Type[] $typeMap
  
  @return Type[]