Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ArtisanCallbackHandler implements ArtisanHandler |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var callable |
||
13 | */ |
||
14 | protected $callable; |
||
15 | |||
16 | |||
17 | 2 | public function __construct( |
|
18 | callable $callable, |
||
19 | ) { |
||
20 | 2 | $this->callable = $callable; |
|
21 | } |
||
22 | |||
23 | /** |
||
24 | * Check is called on start to determine if the callback should be called |
||
25 | * |
||
26 | * @param Application $app |
||
27 | * @return boolean |
||
28 | */ |
||
29 | 2 | public function check(Application $app): bool |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * Executes the passed in callback |
||
36 | * |
||
37 | * @param Application $intercepted |
||
38 | * @return void |
||
39 | */ |
||
40 | 2 | public function handle(Application $intercepted): void |
|
44 | } |
||
45 | |||
47 | } |