Completed
Push — master ( 436dd0...fa694e )
by Nicolas
05:17
created

ParentId   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 24
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setType() 0 4 1
A setId() 0 4 1
A setIgnoreUnmapped() 0 4 1
1
<?php
2
namespace Elastica\Query;
3
4
class ParentId extends AbstractQuery
5
{
6
    public function __construct($type, $id, $ignoreUnmapped = false)
7
    {
8
        $this->setType($type);
9
        $this->setId($id);
10
        $this->setIgnoreUnmapped($ignoreUnmapped);
11
    }
12
13
    private function setType($type)
14
    {
15
        $this->setParam('type', $type);
16
    }
17
18
    private function setId($id)
19
    {
20
        $this->setParam('id', $id);
21
    }
22
23
    private function setIgnoreUnmapped($ignoreUnmapped)
24
    {
25
        $this->setParam('ignore_unmapped', $ignoreUnmapped);
26
    }
27
}
28