Skip to content
@php-type-language

PHP TypeLang

PHP strict type description language

PHP Type Language

TypeLang is a toolkit for the type syntax of PHPDoc: the one you write in @param, @return and @var for PHPStan and Psalm.

$type = new TypeLang\Parser\TypeParser()
    ->parse('array<non-empty-string, list<User>|null>');
Package What it does
parser Type string to AST
types AST nodes
printer AST back to a string
reader PHP Reflection to AST
phpdoc DocBlock to description and tags
mapper Maps data to objects and back by these types

Documentation · Syntax Reference

Pinned Loading

  1. dev dev Public

    A monorepo with core development packages

    PHP 1

  2. parser parser Public

    [READ ONLY] 🧱 Library for parsing and validating TypeLang syntax and converting it into AST nodes

    PHP 51 2

  3. mapper mapper Public

    [READ ONLY]⚡ The best PHP mapper (hydrator/serializer) you've ever seen!

    PHP 38 2

  4. phpdoc phpdoc Public

    [READ ONLY] 🗃️ Library for recognizing PHPDoc Tags in PHP DocBlock comments

    PHP 10 1

Repositories

Showing 10 of 13 repositories

Top languages

Loading…

Most used topics

Loading…