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

ParentId::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
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