Passed
Pull Request — master (#129)
by Serhii
13:55
created

DefaultAlias::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
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