Skip to content

Commit

Permalink
Added some code
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbanton committed Jun 16, 2016
1 parent 6abc4d3 commit d0eb039
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.idea/
/vendor/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# dd
Laravel's style oldschool dd function
Laravel's style old school dd function
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "maxbanton/dd",
"description": "Laravel's old school style dump library",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Max Leonov",
"email": "hi@maxleonov.pw"
}
],
"autoload": {
"files": [
"src/functions.php"
]
},
"minimum-stability": "stable",
"require": {}
}
17 changes: 17 additions & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

if (!function_exists('dd')) {
/**
* Dump the passed variables and end the script.
*
* @param mixed
* @return void
*/
function dd()
{
array_map(function ($x) {
var_dump($x);
}, func_get_args());
die;
}
}

0 comments on commit d0eb039

Please sign in to comment.