Completed
Push — master ( d819e3...4fe283 )
by Christopher
03:01 queued 12s
created

CloneWithMethod   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A cloneWith() 0 7 1
1
<?php
2
3
namespace AsyncPHP\Icicle\Database\Method;
4
5
trait CloneWithMethod
6
{
7
    /**
8
     * @param string $key
9
     * @param mixed $value
10
     *
11
     * @return static
12
     */
13 1
    public function cloneWith($key, $value)
14
    {
15 1
        $clone = clone $this;
16 1
        $clone->$key = $value;
17
18 1
        return $clone;
19
    }
20
}
21