Test Failed
Push — master ( 2c2c87...ed1c51 )
by Chris
25:05 queued 37s
created

LazyLoadedSettingHandler::__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
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Leonidas\Library\Admin\Setting;
4
5
use Closure;
6
use Leonidas\Contracts\Admin\Setting\SettingHandlerInterface;
7
8
class LazyLoadedSettingHandler implements SettingHandlerInterface
9
{
10
    protected Closure $callback;
11
12
    public function __construct(Closure $callback)
13
    {
14
        $this->callback = $callback;
15
    }
16
17
    public function handleInput($input)
18
    {
19
        return ($this->callback)($input);
20
    }
21
}
22