for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
declare(strict_types=1);
namespace Spiral\Jobs;
final class Options implements \JsonSerializable
{
/** @var int|null */
private $delay = null;
/** @var string|null */
private $pipeline = null;
* @param int $delay
* @return self
public function withDelay(?int $delay): self
$options = clone $this;
$options->delay = $delay;
return $options;
}
* @return string|null
public function getPipeline(): ?string
return $this->pipeline;
* @param string|null $pipeline
public function withPipeline(?string $pipeline): self
$options->pipeline = $pipeline;
* @return int|null
public function getDelay(): ?int
return $this->delay;
* @return array|mixed
#[\ReturnTypeWillChange]
public function jsonSerialize()
return [
'delay' => $this->delay,
'pipeline' => $this->pipeline,
];
* @return Options
public static function delayed(int $delay): Options
$options = new self();