createFromSpec() public static method

- [$instance, 'method'] - ['Foo', 'bar'] - ['foo'] - [function () }]
public static createFromSpec ( string[] | string | Closure $spec, string $parameterName ) : ReflectionParameter
$spec string[] | string | Closure
$parameterName string
return ReflectionParameter
 public function testCreateFromSpecWithInvalidArgumentThrowsException()
 {
     $this->expectException(\InvalidArgumentException::class);
     $this->expectExceptionMessage('Could not create reflection from the spec given');
     ReflectionParameter::createFromSpec(123, 'a');
 }