TranslatableResource   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 36
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getKey() 0 4 1
A getParameters() 0 4 1
1
<?php
2
3
namespace RemiSan\Intl;
4
5
class TranslatableResource
6
{
7
    /** @var string */
8
    private $key;
9
10
    /** @var string[] */
11
    private $parameters;
12
13
    /**
14
     * Constructor.
15
     *
16
     * @param string   $key
17
     * @param string[] $parameters
18
     */
19 15
    public function __construct($key, array $parameters = [])
20
    {
21 15
        $this->key = $key;
22 15
        $this->parameters = $parameters;
23 15
    }
24
25
    /**
26
     * @return string
27
     */
28 15
    public function getKey()
29
    {
30 15
        return $this->key;
31
    }
32
33
    /**
34
     * @return string
35
     */
36 9
    public function getParameters()
37
    {
38 9
        return $this->parameters;
39
    }
40
}
41