claytonrcarter / tree-sitter-phpdoc

PHPDoc grammar for tree-sitter
22 stars 10 forks source link

feat: add support for psalm and phpstan array and list shapes #27

Open afranioce opened 1 year ago

afranioce commented 1 year ago

Add support for a special format for list arrays

<?php

class Foo {
    /**
     * @param array{criteria: string, handler: Bar} $handlers
     */
    public function singleLine(array $handlers)
    {
    }

    /**
     * @param array {
     *     criteria: string,
     *     handler: Bar
     *  } $handlers
     */
    public function multipleLines(array $handlers)
    {
    }
}