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)
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)
Thu, Nov 21, 12:23 AM
Unknown Object (File)
Wed, Nov 20, 2:56 AM
Unknown Object (File)
Nov 16 2024, 6:37 PM
Unknown Object (File)
Nov 9 2024, 3:20 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