Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jun 15 2025, 9:17 PM
Unknown Object (File)
May 19 2025, 8:00 PM
Unknown Object (File)
Apr 27 2025, 11:41 AM
Unknown Object (File)
Apr 21 2025, 8:35 PM
Unknown Object (File)
Apr 17 2025, 10:00 PM
Unknown Object (File)
Apr 16 2025, 11:07 PM
Unknown Object (File)
Mar 14 2025, 3:14 AM
Unknown Object (File)
Feb 27 2025, 6:41 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