HH\ExperimentalParserUtils\find_method_parameters

Instead of doing a full recursion like the lambda extractor, this function can do a shallow search of the tree to collect methods by name

namespace HH\ExperimentalParserUtils;

function find_method_parameters(
  HH\ExperimentalParserUtils\array $json,
  string $method_name,
  int $line_number,
): HH\ExperimentalParserUtils\array;

If there is a tie, use the line number

Parameters

  • HH\ExperimentalParserUtils\array $json
  • string $method_name
  • int $line_number