Skip to content

Commit

Permalink
[8.x] Restore auto-complete functionality on when and unless (#38018
Browse files Browse the repository at this point in the history
)

* Help PHPStorm provide auto-complete

* Sometimes `when()` may not return `$this`

* Update Conditionable.php

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
deleugpn and taylorotwell authored Jul 15, 2021
1 parent ebc3ce4 commit da75e2a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Illuminate/Support/Traits/Conditionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ trait Conditionable
* @param mixed $value
* @param callable $callback
* @param callable|null $default
*
* @return mixed
* @return $this|mixed
*/
public function when($value, $callback, $default = null)
{
Expand All @@ -30,8 +29,7 @@ public function when($value, $callback, $default = null)
* @param mixed $value
* @param callable $callback
* @param callable|null $default
*
* @return mixed
* @return $this|mixed
*/
public function unless($value, $callback, $default = null)
{
Expand Down

0 comments on commit da75e2a

Please sign in to comment.