PHPackages                             argo-php/types - 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. argo-php/types

ActivePackage[Utility &amp; Helpers](/categories/utility)

argo-php/types
==============

Extended type system for PHP

v1.0.0(7mo ago)03123PHPPHP 8.3.\*|8.4.\*|8.5.\*

Since Nov 25Pushed 7mo agoCompare

[ Source](https://github.com/argo-php/types)[ Packagist](https://packagist.org/packages/argo-php/types)[ RSS](/packages/argo-php-types/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (3)

argo/types
==========

[](#argotypes)

Extended PHP type definition system.

Allows for more complete description of types in PHP, taking into account not only built-in types but also extended phpstan/psalm types, described in PHPDoc. This package itself only provides classes with type descriptions.

### Argo\\Types\\TypeInterface

[](#argotypestypeinterface)

A common interface for all types. Provides several common methods:

```
public function isNullable(): bool;
```

Checks that the specified type is nullable (that is, it allows null to be used as a value).

```
public function setNullable(): TypeInterface;
```

Returns a new instance of the type that is nullable. If the type was already nullable, it returns itself.

```
public function __toString(): string;
```

Returns a string representation of the type. This returns a full description of the type, suitable for PHPDoc.

```
public function toNativeTypeString(): string;
```

Returns a string representation of a native PHP type.

```
public function isContravariantTo(TypeInterface $type): bool;
```

Checks whether the given type is contravariant with respect to the passed `$type`.

### Argo\\Types\\NamedTypeInterface

[](#argotypesnamedtypeinterface)

An interface implemented by all non-generic or complex types. It provides no additional methods.

### Argo\\Types\\Atomic\*

[](#argotypesatomic)

This namespace contains basic PHP types:

- `ArrayType` - array type
- `BoolType` - bool type
- `Callable` - callable type
- `ClassType` - type for all non-anonymous classes
- `FloatType` - float type
- `IntType` - int type
- `MixedType` - mixed type
- `NeverType` - never type
- `NotType` - a special type for aliases that represents the negation of the type
- `NullType` - null type
- `ObjectType` - object type
- `ResourceType` - resource type
- `StringType` - string type
- `VoidType` - void type

### Argo\\Types\\Alias\*

[](#argotypesalias)

Special aliases for types:

- `ArrayKeyType` - array-key (int|string)
- `CallableStringType` - callable-string (string)
- `ClassStringType` - class-string (string)
- `FalseType` - false (bool)
- `FloatConstType` - constant float (e.g. 1.23)
- `IntConstType` - constant int (e.g. 123)
- `IntMaskOfType` - int-mask-of (int)
- `IntMaskType` - int-mask (int)
- `IntRangeType` - int&lt;min,max&gt; (int)
- `IterableType` - iterable (array|\\Traversable)
- `ListType` - list (array)
- `NegativeIntType` - negative-int (int)
- `NonEmptyArrayType` - non-empty-array (array)
- `NonEmptyListType` - non-empty-list (array)
- `NonEmptyStringType` - non-empty-string (string)
- `NonFalsyStringType` - non-falsy-string (string)
- `NonNegativeIntType` - non-negative-int (int)
- `NonPositiveIntType` - non-positive-int (int)
- `NumericStringType` - numeric-string (string)
- `NumericType` - numeric (int|float|numeric-string)
- `PositiveIntType` - positive-int (int)
- `ScalarType` - scalar (string|int|float|bool)
- `StringConstType` - constant string (e.g. "hello")
- `TraitStringType` - trait-string (string)
- `TrueType` - true (bool)
- `TruthyStringType` - truthy-string (string)

### Argo\\Types\\Complex\*

[](#argotypescomplex)

Complex types:

- `IntersectType` - intersection type of several types (intersect)
- `UnionType` - union type of several types (union)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance65

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

210d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc33cf2a905842e2b7b452bb04d75ba24943d1c22fcffa8aa393d04c0ba20f3c?d=identicon)[darkdarin](/maintainers/darkdarin)

---

Top Contributors

[![darkdarin](https://avatars.githubusercontent.com/u/6123038?v=4)](https://github.com/darkdarin "darkdarin (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/argo-php-types/health.svg)

```
[![Health](https://phpackages.com/badges/argo-php-types/health.svg)](https://phpackages.com/packages/argo-php-types)
```

###  Alternatives

[tttran/viet_qr_generator

VietQR generator by following vietqr specification

1923.0k](/packages/tttran-viet-qr-generator)

PHPackages © 2026

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