RepositoryMock   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A push() 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\Repositories\Repository;
13
14
/**
15
 * @method GatewayMock getGateway()
16
 */
17
class RepositoryMock extends Repository
18
{
19
    /**
20
     * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException
21
     *
22
     * @return int
23
     */
24
    public function push(array $item): int
25
    {
26
        return $this->getGateway()->create($item);
27
    }
28
}
29