Completed
Pull Request — master (#9)
by Samuel
03:17
created

Scope::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace SimpleMapper\Scope;
4
5
class Scope
6
{
7
    /** @var string */
8
    private $name;
9
10
    /** @var callable */
11
    private $callback;
12
13
    /**
14
     * @param string $name
15
     * @param callable $callback
16
     */
17 72
    public function __construct(string $name, callable $callback)
18
    {
19 72
        $this->name = $name;
20 72
        $this->callback = $callback;
21 72
    }
22
23
    /**
24
     * @return string
25
     */
26 70
    public function getName(): string
27
    {
28 70
        return $this->name;
29
    }
30
31
    /**
32
     * @return callable
33
     */
34 2
    public function getCallback(): callable
35
    {
36 2
        return $this->callback;
37
    }
38
}
39