Setter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 11
rs 10
wmc 1

1 Method

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