Scoping::assigned()   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 1
dl 0
loc 4
rs 10
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