We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6fef1b commit c24261aCopy full SHA for c24261a
src/HasConditionalCalls.php
@@ -7,13 +7,14 @@
7
trait HasConditionalCalls
8
{
9
/**
10
- * @param $condition
+ * @param mixed $condition
11
* @param Closure|null $callback
12
*
13
* @return static|ConditionalProxy
14
*/
15
public function when($condition, ?Closure $callback = null)
16
17
+ $condition = (bool)$condition;
18
if ($callback === null) {
19
return new ConditionalProxy($this, $condition);
20
}
0 commit comments