Code Duplication    Length = 8-10 lines in 2 locations

src/Builder.php 1 location

@@ 99-108 (lines=10) @@
96
     *
97
     * @return Builder
98
     */
99
    public function useHttpClient($httpClient): self
100
    {
101
        if (!$httpClient instanceof ClientInterface && !$httpClient instanceof HttpClient) {
102
            throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Psr\\Http\\Client\\ClientInterface');
103
        }
104
105
        $this->httpClient = $httpClient;
106
107
        return $this;
108
    }
109
110
    /**
111
     * Uses the given request factory.

src/Service/Factory.php 1 location

@@ 76-83 (lines=8) @@
73
     *
74
     * @param HttpClient|ClientInterface $httpClient
75
     */
76
    public function setHttpClient($httpClient): void
77
    {
78
        if (!$httpClient instanceof ClientInterface && !$httpClient instanceof HttpClient) {
79
            throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Psr\\Http\\Client\\ClientInterface');
80
        }
81
82
        $this->httpClient = $httpClient;
83
    }
84
85
    /**
86
     * Sets the request factory.