Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F18118685: D19589.diff
Wed, Aug 13, 9:07 AM
F17736541: D19589.id.diff
Jul 20 2025, 5:32 PM
F17735775: D19589.id46826.diff
Jul 20 2025, 3:15 PM
F17735714: D19589.id46821.diff
Jul 20 2025, 3:00 PM
F17735632: D19589.diff
Jul 20 2025, 2:44 PM
F17715922: D19589.id46821.diff
Jul 17 2025, 3:27 PM
F17708084: D19589.id46826.diff
Jul 16 2025, 4:09 PM
F17706594: D19589.id46826.diff
Jul 16 2025, 1:06 PM
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