Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F13181197: D19589.id.diff
Thu, May 9, 9:42 AM
F13179643: D19589.diff
Wed, May 8, 9:20 PM
Unknown Object (File)
Sat, May 4, 6:55 PM
Unknown Object (File)
Wed, May 1, 12:22 AM
Unknown Object (File)
Sat, Apr 27, 5:11 PM
Unknown Object (File)
Apr 6 2024, 10:49 PM
Unknown Object (File)
Apr 4 2024, 4:22 PM
Unknown Object (File)
Mar 23 2024, 10:59 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