LocalizationInfo   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getReplacements() 0 3 1
A __construct() 0 5 1
A getAmount() 0 3 1
A getMessageString() 0 3 1
1
<?php
2
3
4
namespace Apie\ObjectAccessNormalizer\Exceptions;
5
6
final class LocalizationInfo
7
{
8
    /**
9
     * @var string
10
     */
11
    private $messageString;
12
13
    /**
14
     * @var array
15
     */
16
    private $replacements;
17
18
    /**
19
     * @var int
20
     */
21
    private $amount;
22
23
    public function __construct(string $messageString, array $replacements = [], int $amount = 1)
24
    {
25
        $this->messageString = $messageString;
26
        $this->replacements = $replacements;
27
        $this->amount = $amount;
28
    }
29
30
    /**
31
     * Get the message string.
32
     *
33
     * @return string
34
     */
35
    public function getMessageString(): string
36
    {
37
        return $this->messageString;
38
    }
39
40
    /**
41
     * Get the replacements.
42
     *
43
     * @return array
44
     */
45
    public function getReplacements(): array
46
    {
47
        return $this->replacements;
48
    }
49
50
    /**
51
     * Get the amount.
52
     *
53
     * @return int
54
     */
55
    public function getAmount(): int
56
    {
57
        return $this->amount;
58
    }
59
}
60