Passed
Push — master ( 12b4e1...e176ef )
by Lynh
13:05
created

LazyEvaluation::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Jenky\Hermes;
4
5
class LazyEvaluation
6
{
7
    /**
8
     * @var callable
9
     */
10
    protected $callable;
11
12
    /**
13
     * Create a new lazy evaluation instance.
14
     *
15
     * @param  callable $callable
16
     * @return void
17
     */
18
    public function __construct(callable $callable)
19
    {
20
        $this->callable = $callable;
21
    }
22
23
    /**
24
     * Return the callable.
25
     *
26
     * @return callable
27
     */
28
    public function __invoke()
29
    {
30
        return $this->callable->__invoke();
31
    }
32
}
33