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
Requires (Dev)
- phpunit/phpunit: ^9.5
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)); } };