bootstrap.php 680 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of the Carbon package.
  5. *
  6. * (c) Brian Nesbitt <brian@nesbot.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. require_once __DIR__.'/../vendor/autoload.php';
  12. require_once __DIR__.'/PHPUnit/AssertObjectHasPropertyTrait.php';
  13. set_error_handler(static function (
  14. int $errno,
  15. string $errstr,
  16. string $errfile = '',
  17. int $errline = 0,
  18. array $errcontext = []
  19. ): bool {
  20. if (!(error_reporting() & $errno)) {
  21. return false;
  22. }
  23. throw new ErrorException($errstr, $errno, $errno, $errfile, $errline);
  24. });