Completed
Push — master ( 6067eb...3f355c )
by Samuel
15:57 queued 01:01
created

Scope::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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