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

Scope::getCallback()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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