FieldSearchResult::getMetadata()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * @copyright   (c) 2017-present brian ridley
5
 * @author      brian ridley <[email protected]>
6
 * @license     http://opensource.org/licenses/MIT MIT
7
 */
8
9
namespace ptlis\GrepDb\Search\Result;
10
11
use ptlis\GrepDb\Metadata\MySQL\ColumnMetadata;
12
13
/**
14
 * DTO representing a matched field.
15
 */
16
final class FieldSearchResult
17
{
18
    /** @var ColumnMetadata */
19
    private $column;
20
21
    /** @var string */
22
    private $value;
23
24
25 4
    public function __construct(
26
        ColumnMetadata $column,
27
        string $value
28
    ) {
29 4
        $this->column = $column;
30 4
        $this->value = $value;
31 4
    }
32
33 4
    public function getMetadata(): ColumnMetadata
34
    {
35 4
        return $this->column;
36
    }
37
38 1
    public function getValue(): string
39
    {
40 1
        return $this->value;
41
    }
42
}