sunnyflail/typestring

There is no license information available for the latest version (1.0.0) of this package.

A simple trait for retrieving Reflection types as a string

1.0.0 2021-06-04 22:37 UTC

This package is auto-updated.

Last update: 2025-04-05 07:18:50 UTC


README

#Typestring A simple trait for getting Reflection return types as a string #Sample usage

use SunnyFlail\Traits\GetTypesTrait;

$implementator = new class {
    use GetTypesTrait;

    public function sampleUsage()
    {
        $reflection = new ReflectionClass(PDO::class);
        $method = $reflection->getMethod("prepare");
        $param = $method->getParameters()[0];
        var_dump($this->getTypeStrings($param));
    }

};