Skip to content

ThoroughPHP/TypeSignature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeSignature - Type signature generator for PHP

Build Status Coverage Status License: MIT PHPStan

Features

Supports following PHP types:

TypeSignature::array('string'); // => 'string[]'
TypeSignature::number(); // => 'integer|float|double'
TypeSignature::union(TypeSignature::integer(), TypeSignature::string()); // => 'integer|string'
TypeSignature::intersection(\ArrayAccess::class, \Countable::class); // => 'ArrayAccess&Countable'
TypeSignature::optional(TypeSignature::string()); => 'string

TODO