diff --git a/src/Hydrator/ModelHydrator.php b/src/Hydrator/ModelHydrator.php index 9d6e1ea..d54224b 100644 --- a/src/Hydrator/ModelHydrator.php +++ b/src/Hydrator/ModelHydrator.php @@ -23,6 +23,8 @@ use Psr\Http\Message\ResponseInterface; final class ModelHydrator implements Hydrator { /** + * @phpstan-param class-string $class + * * @return ResponseInterface */ public function hydrate(ResponseInterface $response, string $class) @@ -41,7 +43,7 @@ final class ModelHydrator implements Hydrator } if (is_subclass_of($class, ApiResponse::class)) { - $object = call_user_func($class.'::create', $data); + $object = call_user_func([$class, 'create'], $data); } else { $object = new $class($data); }