1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
if (! function_exists('tap_if')) { |
4
|
|
|
/** |
5
|
|
|
* Call the given Closure with the given value then return the value if the given condition is true. |
6
|
|
|
* |
7
|
|
|
* @param mixed $condition |
8
|
|
|
* @param mixed $value |
9
|
|
|
* @param callable|null $callback |
10
|
|
|
* @return mixed|\Illuminate\Support\HigherOrderTapProxy |
11
|
|
|
*/ |
12
|
|
|
function tap_if($condition, $value, callable $callback = null) |
13
|
|
|
{ |
14
|
|
|
if ($condition) { |
15
|
|
|
return tap($value, $callback); |
16
|
|
|
} |
17
|
|
|
|
18
|
|
|
return $value; |
19
|
|
|
} |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
if (! function_exists('tap_unless')) { |
23
|
|
|
/** |
24
|
|
|
* Call the given Closure with the given value then return the value unless the given condition is true. |
25
|
|
|
* |
26
|
|
|
* @param mixed $condition |
27
|
|
|
* @param mixed $value |
28
|
|
|
* @param callable|null $callback |
29
|
|
|
* @return mixed|\Illuminate\Support\HigherOrderTapProxy |
30
|
|
|
*/ |
31
|
|
|
function tap_unless($condition, $value, callable $callback = null) |
32
|
|
|
{ |
33
|
|
|
return tap_if(!$condition, $value, $callback); |
34
|
|
|
} |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
if (! function_exists('dd_if')) { |
38
|
|
|
/** |
39
|
|
|
* Run dd() helper if the given condition is true. |
40
|
|
|
* |
41
|
|
|
* @param mixed $condition |
42
|
|
|
* @param mixed ...$vars |
43
|
|
|
* @return exit |
|
|
|
|
44
|
|
|
*/ |
45
|
|
|
function dd_if($condition, ...$vars) |
46
|
|
|
{ |
47
|
|
|
if ($condition) { |
48
|
|
|
dd(...$vars); |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
if (! function_exists('dd_unless')) { |
54
|
|
|
/** |
55
|
|
|
* Run dd() helper unless the given condition is true. |
56
|
|
|
* |
57
|
|
|
* @param mixed $condition |
58
|
|
|
* @param mixed ...$vars |
59
|
|
|
* @return exit |
60
|
|
|
*/ |
61
|
|
|
function dd_unless($condition, ...$vars) |
62
|
|
|
{ |
63
|
|
|
dd_if(!$condition, ...$vars); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths