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)
Thu, Dec 19, 8:09 AM
Unknown Object (File)
Thu, Dec 19, 1:52 AM
Unknown Object (File)
Tue, Dec 17, 10:30 PM
Unknown Object (File)
Thu, Dec 12, 10:05 AM
Unknown Object (File)
Fri, Nov 29, 1:42 PM
Unknown Object (File)
Mon, Nov 25, 10:48 AM
Unknown Object (File)
Nov 21 2024, 12:23 AM
Unknown Object (File)
Nov 20 2024, 2:56 AM
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