Scoping   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A assigned() 0 4 1
A scoped() 0 3 1
1
<?php
2
/**
3
 * Config scopes assigning/getting
4
 * User: moyo
5
 * Date: 2018/8/20
6
 * Time: 4:43 PM
7
 */
8
9
namespace Carno\Config\Chips;
10
11
trait Scoping
12
{
13
    /**
14
     * @var string
15
     */
16
    private $scope = 'default';
17
18
    /**
19
     * @param string $scope
20
     * @return static
21
     */
22
    public function assigned(string $scope) : self
23
    {
24
        $this->scope = $scope;
25
        return $this;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function scoped() : string
32
    {
33
        return $this->scope;
34
    }
35
}
36