mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 23:30:35 -04:00
Flesh out some PHPDocs, and consistently name enums
This commit is contained in:
parent
ace9cea6b7
commit
a9eab552ab
25 changed files with 205 additions and 118 deletions
20
lib/Core.php
20
lib/Core.php
|
@ -12,18 +12,32 @@ mb_internal_encoding('UTF-8');
|
|||
mb_http_output('UTF-8');
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
// Convenience alias of var_dump.
|
||||
/**
|
||||
* Convenient shorthand alias of `var_dump()`.
|
||||
*
|
||||
* @param mixed $var The variable to dump.
|
||||
*/
|
||||
function vd(mixed $var): void{
|
||||
var_dump($var);
|
||||
}
|
||||
|
||||
// var_dump($var) then die().
|
||||
/**
|
||||
* Convenient shorthand alias to `var_dump()`, then `die()`.
|
||||
*
|
||||
* @param mixed $var The variable to dump.
|
||||
*/
|
||||
function vdd(mixed $var): void{
|
||||
var_dump($var);
|
||||
die();
|
||||
}
|
||||
|
||||
// var_dump into a string.
|
||||
/**
|
||||
* `var_dump()` into a string.
|
||||
*
|
||||
* @param mixed $var The variable to dump into a string.
|
||||
*
|
||||
* @return string The output of `var_dump()`.
|
||||
*/
|
||||
function vds(mixed $var): string{
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue