MixinTrait.php 606 B

1234567891011121314151617181920212223242526272829303132
  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 Tests\CarbonPeriod\Fixtures;
  12. trait MixinTrait
  13. {
  14. public function oneMoreDay()
  15. {
  16. return $this->setEndDate($this->endNextDay());
  17. }
  18. public function endNextDay()
  19. {
  20. return $this->getEndDate()->addDay();
  21. }
  22. public function copyOneMoreDay()
  23. {
  24. return $this->copy()->oneMoreDay();
  25. }
  26. }