Add Composer autoloading functions and PHPStan for testing

This commit is contained in:
Alex Cabal 2019-02-26 13:03:45 -06:00
parent e198c4db65
commit f5d7d4e02a
1518 changed files with 169063 additions and 30 deletions

View file

@ -3,35 +3,8 @@ mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
date_default_timezone_set('UTC');
require_once('Constants.php');
// Convenience alias of var_dump.
function vd($var){
var_dump($var);
}
// var_dump($var) then die().
function vdd($var){
var_dump($var);
die();
}
// var_dump into a string.
function vds($var){
ob_start();
var_dump($var);
$str = ob_get_contents();
ob_end_clean();
return $str;
}
spl_autoload_register(function($class){
try{
include($class . '.php');
}
catch(\Exception $ex){
}
});
// Composer auto-loads the lib/ directory in composer.json
require __DIR__ . '/../vendor/autoload.php';
// Custom error handler to output more details about the specific Apache request that caused an exception.
set_exception_handler(function($ex){