Code Duplication    Length = 10-10 lines in 2 locations

src/ServiceCaller.php 1 location

@@ 38-47 (lines=10) @@
35
     *
36
     * @return mixed
37
     */
38
    public function queue($service, ...$params)
39
    {
40
        if (! $this->hasHandler($service)) {
41
            throw ServiceHandlerMethodException::notFound($service);
42
        }
43
44
        return resolve(Dispatcher::class)->dispatch(
45
            new QueuedService(Container::getInstance()->make($service), $params)
46
        );
47
    }
48
}
49

src/Traits/CallsServices.php 1 location

@@ 36-45 (lines=10) @@
33
     *
34
     * @return mixed
35
     */
36
    public function queue(string $service, ...$params)
37
    {
38
        if (! Container::getInstance()->make(ServiceCaller::class)->hasHandler($service)) {
39
            throw ServiceHandlerMethodException::notFound($service);
40
        }
41
42
        return resolve(Dispatcher::class)->dispatch(
43
            new QueuedService(Container::getInstance()->make($service), $params)
44
        );
45
    }
46
}
47