Passed
Push — master ( 4326ac...342126 )
by Mr
02:06
created

AnnotatedValue   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMockValue() 0 3 1
A getOtherMockValue() 0 3 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/interop project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\Tests\Interop\Fixture;
10
11
use Daikon\Interop\FromNativeInterface;
12
use Daikon\Interop\FromToNativeTrait;
13
use Daikon\Interop\MakeEmptyInterface;
14
use Daikon\Interop\ToNativeInterface;
15
16
/**
17
 * @map(mockValue, Daikon\Tests\Interop\Fixture\MockValue::fromNative)
18
 * @map(otherMockValue, Daikon\Tests\Interop\Fixture\MockValue::customFactory)
19
 */
20
final class AnnotatedValue implements FromNativeInterface, ToNativeInterface
21
{
22
    use FromToNativeTrait;
23
24
    private ?MockValue $mockValue;
25
26
    private MockValue $otherMockValue;
27
28
    public function getMockValue(): MockValue
29
    {
30
        return $this->mockValue ?? MockValue::makeEmpty();
31
    }
32
33
    public function getOtherMockValue(): MockValue
34
    {
35
        return $this->otherMockValue;
36
    }
37
}
38