Setter::set()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
/**
3
 * Config setter (locally affected)
4
 * User: moyo
5
 * Date: 22/03/2018
6
 * Time: 11:16 AM
7
 */
8
9
namespace Carno\Config\Chips;
10
11
trait Setter
12
{
13
    /**
14
     * @param string $key
15
     * @param mixed $val
16
     * @return static
17
     */
18
    public function set(string $key, $val) : self
19
    {
20
        $this->reset($key, $val);
0 ignored issues
show
Bug introduced by
It seems like reset() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        $this->/** @scrutinizer ignore-call */ 
21
               reset($key, $val);
Loading history...
21
        return $this;
22
    }
23
}
24