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