protected function getMakeMethod($data) : string { foreach (static::MAKE_METHODS as $class => $method) { if ($data instanceof $class) { return $method; } } throw new InvalidArgumentException('Given data cannot be transformed.'); }