Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F14858693: D19589.diff
Thu, Feb 6, 5:05 AM
Unknown Object (File)
Fri, Jan 31, 7:54 PM
Unknown Object (File)
Wed, Jan 29, 7:51 PM
Unknown Object (File)
Sat, Jan 25, 3:52 AM
Unknown Object (File)
Wed, Jan 22, 5:11 AM
Unknown Object (File)
Tue, Jan 21, 3:44 PM
Unknown Object (File)
Tue, Jan 21, 3:15 PM
Unknown Object (File)
Tue, Jan 21, 11:45 AM
Subscribers

Details

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": []
}

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable