HomePhabricator

Extract needed classes/interfaces from return types

Description

Extract needed classes/interfaces from return types

Summary: Improves scripts/phutil_symbols.php so as to support extracting needed symbols from function return types.

Test Plan:
Ran script/phutil_symbols.php on the following file:

<?php

function x(array $x): void {}

function y(string $x): bool {}

The output was as follows:

{
  "have": {
    "function": {
      "x": 16,
      "y": 47
    }
  },
  "need": {
    "class/interface": {
      "string": 49,
      "void": 29,
      "bool": 61
    }
  },
  "xmap": []
}

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D19589

Details

Provenance
joshuaspenceAuthored on Aug 15 2018, 8:41 PM
joshuaspencePushed on Aug 15 2018, 8:42 PM
Reviewer
Blessed Reviewers
Differential Revision
D19589: Extract needed classes/interfaces from return types
Parents
rPHUdd136d1c3712: In "--trace" output, print elapsed miliseconds for ballparking performance…
Branches
Unknown
Tags
Unknown
Build Status
Buildable 20625
Build 28029: Run Core Tests