File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ class ConditionalProxy
99
1010 /**
1111 * @param object $object
12- * @param $condition
12+ * @param bool $condition
1313 */
14- public function __construct ($ object , $ condition )
14+ public function __construct ($ object , bool $ condition )
1515 {
1616 $ this ->object = $ object ;
1717 $ this ->condition = $ condition ;
Original file line number Diff line number Diff line change 77trait HasConditionalCalls
88{
99 /**
10- * @param $condition
10+ * @param mixed $condition
1111 * @param Closure|null $callback
1212 *
1313 * @return static|ConditionalProxy
1414 */
1515 public function when ($ condition , ?Closure $ callback = null )
1616 {
17+ $ condition = (bool )$ condition ;
1718 if ($ callback === null ) {
1819 return new ConditionalProxy ($ this , $ condition );
1920 }
You can’t perform that action at this time.
0 commit comments