in src/Fixers/ClientUpgradeFixer/ClientVar.php [76:95]
public function getRpcMethod(string $rpcName): ?RpcMethod
{
// Get the Request class name
$newClientClass = $this->getNewClassname();
if (!method_exists($newClientClass, $rpcName)) {
// If the new method doesn't exist, there's nothing we can do
return null;
}
$method = new ReflectionMethod($newClientClass, $rpcName);
$parameters = $method->getParameters();
if (!isset($parameters[0]) || !$type = $parameters[0]->getType()) {
return null;
}
if ($type->isBuiltin()) {
// If the first parameter is a primitive type, assume this is a helper method
return null;
}
return new RpcMethod($this, $rpcName);
}