ansi-php
ansi-php copied to clipboard
[fix] PhpStorm error: Return value is expected to be '\Bramus\Ansi\Ansi', '\Bramus\Ansi\Traits\Ansi' returned
Hi, thanks for the great library.
PhpStorm couldn't resolve the return type for methods in Bramus\Ansi\Traits\ControlFunctions
so I made a small fix.
Example code that shows the error:
public function line(string $text): \Bramus\Ansi\Ansi
{
return $this->text($text)->lf();
}
This should also fix https://github.com/bramus/ansi-php/issues/10.