Code Duplication    Length = 13-15 lines in 2 locations

src/Test/LiteSpeedTest.php 1 location

@@ 105-117 (lines=13) @@
102
     *
103
     * @return LiteSpeed
104
     */
105
    protected function getProxyClient()
106
    {
107
        if (null === $this->proxyClient) {
108
            $httpDispatcher = new HttpDispatcher(
109
                ['http://127.0.0.1:'.$this->getCachingProxyPort()],
110
                $this->getHostName().':'.$this->getCachingProxyPort()
111
            );
112
113
            $this->proxyClient = new LiteSpeed($httpDispatcher);
114
        }
115
116
        return $this->proxyClient;
117
    }
118
}
119

src/Test/NginxTest.php 1 location

@@ 162-176 (lines=15) @@
159
     *
160
     * @return Nginx
161
     */
162
    protected function getProxyClient($purgeLocation = '')
163
    {
164
        if (null === $this->proxyClient) {
165
            $httpDispatcher = new HttpDispatcher(
166
                ['http://127.0.0.1:'.$this->getCachingProxyPort()],
167
                $this->getHostName().':'.$this->getCachingProxyPort()
168
            );
169
170
            $this->proxyClient = new Nginx($httpDispatcher, [
171
                'purge_location' => $purgeLocation,
172
            ]);
173
        }
174
175
        return $this->proxyClient;
176
    }
177
}
178