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)
Sat, Mar 23, 10:59 PM
Unknown Object (File)
Feb 17 2024, 3:09 AM
Unknown Object (File)
Feb 14 2024, 12:35 PM
Unknown Object (File)
Jan 5 2024, 1:46 PM
Unknown Object (File)
Dec 30 2023, 5:43 PM
Unknown Object (File)
Dec 27 2023, 12:49 PM
Unknown Object (File)
Dec 27 2023, 12:49 PM
Unknown Object (File)
Dec 27 2023, 12:49 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