Passed
Push — master ( 35232d...8d0b59 )
by Melech
06:16 queued 02:04
created

NullClient::sendRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Http\Client;
15
16
use Valkyrja\Http\Client\Contract\Client as Contract;
17
use Valkyrja\Http\Message\Factory\Contract\ResponseFactory;
18
use Valkyrja\Http\Message\Request\Contract\Request;
19
use Valkyrja\Http\Message\Response\Contract\Response;
20
21
/**
22
 * Class NullClient.
23
 *
24
 * @author Melech Mizrachi
25
 */
26
class NullClient implements Contract
27
{
28
    public function __construct(
29
        protected ResponseFactory $responseFactory,
30
    ) {
31
    }
32
33
    /**
34
     * @inheritDoc
35
     */
36
    public function sendRequest(Request $request): Response
37
    {
38
        return $this->responseFactory->createResponse();
39
    }
40
}
41