HH\Facts\type_name

Resolve a string into a classname that's properly capitalized and properly typed

namespace HH\Facts;

function type_name(
  string $type_name,
): ?string;

Return null if the classname does not exist in the codebase, even with different capitalization.

Throw InvalidOperationException if Facts is not enabled.

Parameters

  • string $type_name

Returns

  • ?string