Passed
Push — master ( bce6b5...b40887 )
by Aurimas
02:19
created

anonymous//src/NonCacheableClosure.php$0

Complexity

Total Complexity 0

Size/Duplication

Total Lines 1
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 1
b 0
f 0
wmc 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Setherator\Variables;
6
7
use Closure;
8
9
/**
10
 * @author Aurimas Niekis <[email protected]>
11
 */
12
class NonCacheableClosure
13
{
14
    private Closure $closure;
15
16 6
    public function __construct(Closure $closure)
17
    {
18 6
        $this->closure = $closure;
19 6
    }
20
21 6
    public function __invoke()
22
    {
23 6
        $closure = $this->closure;
24
25 6
        return $closure();
26
    }
27
}
28