SearchWordDefinitionMessage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Dictionary\Features\PopulateStorage\Populate\Message;
6
7
/**
8
 * @psalm-immutable
9
 *
10
 * @see SearchWordDefinitionMessageHandler
11
 */
12
final class SearchWordDefinitionMessage
13
{
14
    private string $word;
15
    private string $language;
16
17
    public function __construct(string $word, string $language)
18
    {
19
        $this->word = $word;
20
        $this->language = $language;
21
    }
22
23
    public function word(): string
24
    {
25
        return $this->word;
26
    }
27
28
    public function language(): string
29
    {
30
        return $this->language;
31
    }
32
}
33