Add dd function

This commit is contained in:
Oliver Davies 2019-06-29 13:18:14 +01:00
parent 6c017505f5
commit 3b96de3da1
2 changed files with 10 additions and 1 deletions

View file

@ -22,7 +22,8 @@
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.15", "friendsofphp/php-cs-fixer": "^2.15",
"phpunit/phpunit": "^7.5" "phpunit/phpunit": "^7.5",
"symfony/var-dumper": "^4.3"
}, },
"autoload": { "autoload": {
"files": ["src/helpers.php"] "files": ["src/helpers.php"]

View file

@ -1,5 +1,13 @@
<?php <?php
if (!function_exists('dd')) {
function dd(): void
{
dump(func_get_args());
die;
}
}
if (!function_exists('env')) { if (!function_exists('env')) {
function env(string $name, ?string $default = null): ?string function env(string $name, ?string $default = null): ?string
{ {