Boundaries.php
4 years ago
Cast.php
4 years ago
Comparison.php
2 years ago
Converter.php
2 years ago
Creator.php
2 years ago
Date.php
9 months ago
DeprecatedProperties.php
4 years ago
Difference.php
2 years ago
IntervalRounding.php
2 years ago
IntervalStep.php
4 years ago
Localization.php
9 months ago
Macro.php
4 years ago
MagicParameter.php
2 years ago
Mixin.php
2 years ago
Modifiers.php
4 years ago
Mutability.php
4 years ago
ObjectInitialisation.php
4 years ago
Options.php
2 years ago
Rounding.php
2 years ago
Serialization.php
2 years ago
Test.php
9 months ago
Timestamp.php
1 year ago
ToStringFormat.php
3 years ago
Units.php
2 years ago
Week.php
4 years ago
index.php
3 years ago
MagicParameter.php
17 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Carbon\Traits; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | trait MagicParameter |
| 5 | { |
| 6 | private function getMagicParameter(array $parameters, int $index, string $key, $default) |
| 7 | { |
| 8 | if (\array_key_exists($index, $parameters)) { |
| 9 | return $parameters[$index]; |
| 10 | } |
| 11 | if (\array_key_exists($key, $parameters)) { |
| 12 | return $parameters[$key]; |
| 13 | } |
| 14 | return $default; |
| 15 | } |
| 16 | } |
| 17 |