Page MenuHomePhabricator

Extract needed classes/interfaces from return types
ClosedPublic

Authored by joshuaspence on Aug 15 2018, 2:07 AM.
Tags
None
Referenced Files
F15380482: D19589.diff
Fri, Mar 14, 3:14 AM
Unknown Object (File)
Thu, Feb 27, 6:41 PM
Unknown Object (File)
Feb 6 2025, 5:05 AM
Unknown Object (File)
Jan 31 2025, 7:54 PM
Unknown Object (File)
Jan 29 2025, 7:51 PM
Unknown Object (File)
Jan 25 2025, 3:52 AM
Unknown Object (File)
Jan 22 2025, 5:11 AM
Unknown Object (File)
Jan 21 2025, 3:44 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