Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F19534165: D19589.id46826.diff
Jan 20 2026, 10:42 PM
F19534164: D19589.id46821.diff
Jan 20 2026, 10:42 PM
F19534163: D19589.id.diff
Jan 20 2026, 10:42 PM
F19516064: D19589.diff
Jan 14 2026, 7:25 PM
F19348728: D19589.diff
Dec 26 2025, 2:41 AM
F18906421: D19589.diff
Nov 8 2025, 6:20 PM
F18824304: D19589.id46821.diff
Oct 23 2025, 3:06 PM
F18821603: D19589.id46826.diff
Oct 23 2025, 12:51 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