Completed
Push — master ( f59d63...2f2930 )
by Christopher
02:24
created

CloneWithMethod   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

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 0
cts 4
cp 0
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
    public function cloneWith($key, $value)
14
    {
15
        $clone = clone $this;
16
        $clone->$key = $value;
17
18
        return $clone;
19
    }
20
}
21