StorageMetadata   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 4 1
A merge() 0 4 1
1
<?php
2
3
namespace As3\Modlr\Search\Elastic;
4
5
use As3\Modlr\Metadata\AttributeMetadata;
6
use As3\Modlr\Metadata\FieldMetadata;
7
use As3\Modlr\Metadata\Interfaces\MergeableInterface;
8
use As3\Modlr\Metadata\Interfaces\StorageLayerInterface;
9
10
/**
11
 * Defines the storage metadata for Elastic.
12
 *
13
 * @author Jacob Bare <[email protected]>
14
 */
15
class StorageMetadata implements StorageLayerInterface
16
{
17
    /**
18
     * @var string
19
     */
20
    public $index;
21
22
    /**
23
     * @var string
24
     */
25
    public $type;
26
27
    /**
28
     * Returns the client key for this search metadata.
29
     *
30
     * @return  string
31
     */
32
    public function getKey()
33
    {
34
        return Client::CLIENT_KEY;
35
    }
36
37
    /**
38
     * {@inheritDoc}
39
     */
40
    public function merge(MergeableInterface $metadata)
41
    {
42
        return $this;
43
    }
44
}
45