Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait Tappable |
||
8 | { |
||
9 | use BaseTappable; |
||
10 | |||
11 | /** |
||
12 | * Call the given Closure with this instance then return the instance if the given condition is true. |
||
13 | * |
||
14 | * @param mixed $condition |
||
15 | * @param callable|null $callback |
||
16 | * @return $this|\Illuminate\Support\HigherOrderTapProxy |
||
17 | */ |
||
18 | public function tapIf($condition, callable $callback = null) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Call the given Closure with this instance then return the instance unless the given condition is true. |
||
25 | * |
||
26 | * @param mixed $condition |
||
27 | * @param callable|null $callback |
||
28 | * @return $this|\Illuminate\Support\HigherOrderTapProxy |
||
29 | */ |
||
30 | public function tapUnless($condition, callable $callback = null) |
||
35 |