ResponseMock   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A response() 0 3 1
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of FlexPHP.
4
 *
5
 * (c) Freddie Gar <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace FlexPHP\UseCases\Tests\Mocks;
11
12
use FlexPHP\Messages\ResponseInterface;
13
14
class ResponseMock implements ResponseInterface
15
{
16
    /**
17
     * @var int
18
     */
19
    private $response;
20
21
    public function __construct(int $data)
22
    {
23
        $this->response = $data;
24
    }
25
26
    public function response(): int
27
    {
28
        return $this->response;
29
    }
30
}
31