PHPackages                             sevavietl/type-signature - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sevavietl/type-signature

Abandoned → [thorough-php/type-signature](/?search=thorough-php%2Ftype-signature)Library[Utility &amp; Helpers](/categories/utility)

sevavietl/type-signature
========================

Type signature generator for PHP

v1.0(7y ago)45MITPHPPHP &gt;=7.2

Since Sep 18Pushed 7y ago3 watchersCompare

[ Source](https://github.com/Sevavietl/TypeSignature)[ Packagist](https://packagist.org/packages/sevavietl/type-signature)[ RSS](/packages/sevavietl-type-signature/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

TypeSignature - Type signature generator for PHP
================================================

[](#typesignature---type-signature-generator-for-php)

[![Build Status](https://camo.githubusercontent.com/25274e854722e1b2cb67b7d230c53a8402c63e19e478614cbf97c570e10e499a/68747470733a2f2f7472617669732d63692e636f6d2f54686f726f7567685048502f547970655369676e61747572652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ThoroughPHP/TypeSignature)[![Coverage Status](https://camo.githubusercontent.com/9d5b2ea3e8b4bc9be58ab557434adfba7699e8e626da6fd2de52f7f1afaea6c2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f54686f726f7567685048502f547970655369676e61747572652f62616467652e737667)](https://coveralls.io/github/ThoroughPHP/TypeSignature)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

Features
--------

[](#features)

Supports following PHP [types](http://php.net/manual/en/language.types.intro.php):

- [boolean](http://php.net/manual/en/language.types.boolean.php)
- [integer](http://php.net/manual/en/language.types.integer.php)
- [float](http://php.net/manual/en/language.types.float.php)
- [string](http://php.net/manual/en/language.types.string.php)
- [array](http://php.net/manual/en/language.types.array.php)

```
TypeSignature::array('string'); // => 'string[]'
```

- [object](http://php.net/manual/en/language.types.object.php)
- [callable](http://php.net/manual/en/language.types.callable.php)
- [mixed](http://php.net/manual/en/language.pseudo-types.php#language.types.mixed)
- [number](http://php.net/manual/en/language.pseudo-types.php#language.types.number)

```
TypeSignature::number(); // => 'integer|float|double'
```

- [callback](http://php.net/manual/en/language.pseudo-types.php#language.types.callback)
- [union types](https://ceylon-lang.org/documentation/1.3/tour/types/#union_types)

```
TypeSignature::union(TypeSignature::integer(), TypeSignature::string()); // => 'integer|string'
```

- [intersection types](https://ceylon-lang.org/documentation/1.3/tour/types/#intersection_types)

```
TypeSignature::intersection(\ArrayAccess::class, \Countable::class); // => 'ArrayAccess&Countable'
```

- [optional types](http://php.net/manual/en/migration71.new-features.php)

```
TypeSignature::optional(TypeSignature::string()); => 'string
```

TODO
----

[](#todo)

- iterable
- [resource](http://php.net/manual/en/language.types.resource.php)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Total

2

Last Release

2622d ago

Major Versions

v0.1 → v1.02019-03-09

PHP version history (2 changes)v0.1PHP &gt;=7.1

v1.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d447606cedb25aa0f2e4a57788d793bb46215aadaa5841b8ccf66f9477e5267?d=identicon)[sevavietl](/maintainers/sevavietl)

---

Top Contributors

[![Sevavietl](https://avatars.githubusercontent.com/u/1844827?v=4)](https://github.com/Sevavietl "Sevavietl (2 commits)")

---

Tags

phpsignaturetype

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sevavietl-type-signature/health.svg)

```
[![Health](https://phpackages.com/badges/sevavietl-type-signature/health.svg)](https://phpackages.com/packages/sevavietl-type-signature)
```

###  Alternatives

[sculpin/sculpin

Static Site Generator

1.5k102.8k12](/packages/sculpin-sculpin)[topshelfcraft/supersort

...a super-duper sorting function for your Craft templates.

4287.1k1](/packages/topshelfcraft-supersort)[artisansdk/cqrs

A foundational package for Command Query Responsibility Segregation (CQRS) compatible with Laravel.

8414.1k](/packages/artisansdk-cqrs)[corneltek/class-template

Class template Utilities

14158.1k3](/packages/corneltek-class-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
