Passed
Push — master ( b72680...5fbcde )
by Artem
01:02 queued 10s
created

FakeCodeRepo::rollbackTransaction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 1
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Prozorov\DataVerification\Repositories;
4
5
use Prozorov\DataVerification\Contracts\CodeRepositoryInterface;
6
use Prozorov\DataVerification\Integrations;
0 ignored issues
show
Bug introduced by
The type Prozorov\DataVerification\Integrations was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Prozorov\DataVerification\Models\Code;
8
use Prozorov\DataVerification\Types\Address;
9
use Datetime;
10
11
class FakeCodeRepo implements CodeRepositoryInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16 4
    public function save(Code $code): Code
17
    {
18 4
        return new Code();
19
    }
20
21
    /**
22
     * @inheritDoc
23
     */
24
    public function delete(Code $code): void
25
    {
26
        
27
    }
28
29
    /**
30
     * @inheritDoc
31
     */
32
    public function create(Code $code): Code
0 ignored issues
show
Unused Code introduced by
The parameter $code is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

32
    public function create(/** @scrutinizer ignore-unused */ Code $code): Code

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
    {
34
        return new Code();
35
    }
36
37
    /**
38
     * @inheritDoc
39
     */
40
    public function update(Code $code): Code
41
    {
42
        return $code;
43
    }
44
45
    /**
46
     * @inheritDoc
47
     */
48
    public function getOneUnvalidatedByCode(string $code, Datetime $createdAfter = null): ?Code
49
    {
50
        return null;
51
    }
52
53
    /**
54
     * @inheritDoc
55
     */
56 4
    public function getLastCodeForAddress(Address $address, Datetime $createdAfter = null): ?Code
57
    {
58 4
        return null;
59
    }
60
61
    /**
62
     * @inheritDoc
63
     */
64 4
    public function getCodesCountForAddress(Address $address, Datetime $createdAfter = null): ?int
65
    {
66 4
        return 0;
67
    }
68
69
    /**
70
     * @inheritDoc
71
     */
72 1
    public function openTransaction(): void
73
    {
74
75 1
    }
76
77
    /**
78
     * @inheritDoc
79
     */
80 1
    public function commitTransaction(): void
81
    {
82
83 1
    }
84
85
    /**
86
     * @inheritDoc
87
     */
88
    public function rollbackTransaction(): void
89
    {
90
91
    }
92
}
93