ServiceProvider.php 603 B

12345678910111213141516171819202122232425262728293031
  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. namespace Illuminate\Support;
  12. use Illuminate\Events\EventDispatcher;
  13. use Tests\Laravel\App;
  14. class ServiceProvider
  15. {
  16. /**
  17. * @var App
  18. */
  19. public $app;
  20. public function __construct($dispatcher = null)
  21. {
  22. $this->app = new App();
  23. $this->app->setEventDispatcher($dispatcher ?: new EventDispatcher());
  24. }
  25. }