SaveOneResult::isUpserted()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Created by gerk on 05.11.17 17:33
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Data\Result;
7
8
9
/**
10
 *
11
 *
12
 * @author Karsten J. Gerber <[email protected]>
13
 */
14
class SaveOneResult extends InsertOneResult
15
{
16
    /** @var bool */
17
    private $upserted;
18
19
    /**
20
     * @param string $insertId
21
     * @param bool   $acknowledged
22
     * @param bool   $upserted
23
     */
24 24
    public function __construct($insertId, $acknowledged, $upserted)
25
    {
26 24
        parent::__construct($insertId, $acknowledged);
27
28 24
        $this->upserted = $upserted;
29 24
    }
30
31
    /**
32
     * @return bool
33
     */
34
    public function isUpserted()
35
    {
36
        return $this->upserted;
37
    }
38
}
39