Passed
Pull Request — master (#129)
by Serhii
09:00
created

DefaultAlias   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 29
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A config() 0 3 1
A __construct() 0 3 1
A name() 0 3 1
1
<?php
2
3
namespace Matchish\ScoutElasticSearch\ElasticSearch;
4
5
/**
6
 * @internal
7
 */
8
final class DefaultAlias implements Alias
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * @param string $name
17
     */
18 14
    public function __construct(string $name)
19
    {
20 14
        $this->name = $name;
21 14
    }
22
23
    /**
24
     * @return string
25
     */
26 14
    public function name(): string
27
    {
28 14
        return $this->name;
29
    }
30
31
    /**
32
     * @return array
33
     */
34 14
    public function config(): array
35
    {
36 14
        return [];
37
    }
38
}
39