SaveOneResult   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 25
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A isUpserted() 0 4 1
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