-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] Adds
Dumpable
concern (#47122)
* Adds `Support\Traits\Dumpable` * Use globals * Includes dependency * Migrates `Stringable` * Apply fixes from StyleCI * Migrates `EnumeratesValues` * Apply fixes from StyleCI * Uses var dumper * Simplifies * Removes include * Migrates `Builder` * Removes reference to `VarDumper` * Simplifies `VarDumper` * Apply fixes from StyleCI * Migrates `InteractsWithInput` * Apply fixes from StyleCI * Migrates `Carbon` * Migrates `TestResponse` * Apply fixes from StyleCI * MIgrates `Debugging` * Avoids BC * Uses `dump(...$args)` * Argument * Removes dependency * Makes `dump` consistent * Update Dumpable.php --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: Taylor Otwell <[email protected]>
- Loading branch information
1 parent
7cf552a
commit 4326fc3
Showing
9 changed files
with
64 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Illuminate\Support\Traits; | ||
|
||
trait Dumpable | ||
{ | ||
/** | ||
* Dump the given arguments and terminate execution. | ||
* | ||
* @param mixed ...$args | ||
* @return never | ||
*/ | ||
public function dd(...$args) | ||
{ | ||
$this->dump(...$args); | ||
|
||
dd(); | ||
} | ||
|
||
/** | ||
* Dump the given arguments. | ||
* | ||
* @param mixed ...$args | ||
* @return $this | ||
*/ | ||
public function dump(...$args) | ||
{ | ||
dump($this, ...$args); | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters