Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F17708084: D19589.id46826.diff
Wed, Jul 16, 4:09 PM
F17706594: D19589.id46826.diff
Wed, Jul 16, 1:06 PM
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
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
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20620
Build 28022: Run Core Tests
Build 28021: arc lint + arc unit