Cli
3 years ago
Doctrine
3 years ago
Exceptions
3 years ago
Lang
3 years ago
Laravel
3 years ago
List
3 years ago
MessageFormatter
3 years ago
PHPStan
3 years ago
Traits
3 years ago
AbstractTranslator.php
3 years ago
Carbon.php
3 years ago
CarbonConverterInterface.php
3 years ago
CarbonImmutable.php
3 years ago
CarbonInterface.php
3 years ago
CarbonInterval.php
3 years ago
CarbonPeriod.php
3 years ago
CarbonPeriodImmutable.php
3 years ago
CarbonTimeZone.php
3 years ago
Factory.php
3 years ago
FactoryImmutable.php
3 years ago
Language.php
3 years ago
Translator.php
3 years ago
TranslatorImmutable.php
3 years ago
TranslatorStrongTypeInterface.php
3 years ago
CarbonPeriodImmutable.php
32 lines
| 1 | <?php |
| 2 | |
| 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 IAWP_SCOPED\Carbon; |
| 12 | |
| 13 | class CarbonPeriodImmutable extends CarbonPeriod |
| 14 | { |
| 15 | /** |
| 16 | * Date class of iteration items. |
| 17 | * |
| 18 | * @var string |
| 19 | */ |
| 20 | protected $dateClass = CarbonImmutable::class; |
| 21 | /** |
| 22 | * Prepare the instance to be set (self if mutable to be mutated, |
| 23 | * copy if immutable to generate a new instance). |
| 24 | * |
| 25 | * @return static |
| 26 | */ |
| 27 | protected function copyIfImmutable() |
| 28 | { |
| 29 | return $this->constructed ? clone $this : $this; |
| 30 | } |
| 31 | } |
| 32 |