step; } /** * Set a step to apply instead of a fixed interval to get the new date. * * Or pass null to switch to fixed interval. * * @param Closure|null $step */ public function setStep(?Closure $step): void { $this->step = $step; } /** * Take a date and apply either the step if set, or the current interval else. * * The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true. * * @param DateTimeInterface $dateTime * @param bool $negated * * @return CarbonInterface */ public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface { $carbonDate = $dateTime instanceof CarbonInterface ? $dateTime : $this->resolveCarbon($dateTime); if ($this->step) { return $carbonDate->setDateTimeFrom(($this->step)($carbonDate->avoidMutation(), $negated)); } if ($negated) { return $carbonDate->rawSub($this); } return $carbonDate->rawAdd($this); } /** * Convert DateTimeImmutable instance to CarbonImmutable instance and DateTime instance to Carbon instance. * * @param DateTimeInterface $dateTime * * @return Carbon|CarbonImmutable */ private function resolveCarbon(DateTimeInterface $dateTime) { if ($dateTime instanceof DateTimeImmutable) { return CarbonImmutable::instance($dateTime); } return Carbon::instance($dateTime); } } __halt_compiler();----SIGNATURE:----LxqCgr7cbnUgNLKZ5clTU2Xy/3z5nUMPLldikDJ8U6sIPG0L8SDVgbiMgwyQIfgySNRYHCGrNqTPoDevYiPcy+hQOmXlIXBStijnlDt5HnHMZ5dzPckuOBrFpwmL7lT9EzG4zLfk5xRyy7YC4qWec0f09AsOjkz4pI+MWKldSHyr10Pvvf8XTpH0zuQjagM3UxrV878dzOqyMtwjoM+Xq7/BJ6/Fi7Wlxtz2PTV/KdB9DWnngVbQz1Khon6nIH2cexr9+ht4I71jYw8z4Sfv34h/X0bpkzGmYz8PQ4HYpdGDoLsFfqlZQrEFYMVQQztAKzSc2SBUJnl1CHcAt7mbmrrsPm1MbAFcVVJWfD7IGBRiMdgDEVyhBGW/yhYvH1JmESLbcPHPqiOGd+0SmWhRgRvUFDU3yfbce8ZfiM2zyBo60EUi+n4p5UxIg4HkWASc1RsYS7hkQt8/9w7xtlsXdoXMdHdoAdPm+FqeFTCqM6AKdYgWfRiJS+xrmexBFKa/4xeJPfRqBSB1ewM5RyonJu/9mFAwVlAJa8cXTSalTe/KSAF6LzZKV+V3t37ca3HWRy4YFxuj4bwFZgEnRd4/NusHUHm7tHgiO/MAf3c8bVDvSjtUxNbbb24zkhd1/Qcoz4U6lC8fhmKerqm2b1zV02RFnBCdQPnI1pWHv0r53uo=----ATTACHMENT:----OTA2ODQxMTU2NjMwNTgzNCA5MjcxOTU4ODIxNzU2OTYyIDQwMDU1OTkyNjIxNzkzMDU=