Skip to content

phpdoc-type: color() #9

@staabm

Description

@staabm

the color method is typed with a array parameter for color.

/**
* Shorthand to set the color.
* @param array $color The color you want to set. Use an array filled with ControlSequences\EscapeSequences\Enums\SGR::COLOR_* constants
* @return Ansi self, for chaining
*/
public function color($color = array())
{
return $this->sgr($color);
}

a lot of examples in the readme indicate that its finde to pass a single color.

static analysis tools like phpstan/psalm error about passing a single color, because of this array type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions