mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Migrated RabbitMqOptions to immutable object
This commit is contained in:
@@ -4,37 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Options;
|
||||
|
||||
use Laminas\Stdlib\AbstractOptions;
|
||||
|
||||
class RabbitMqOptions extends AbstractOptions
|
||||
final class RabbitMqOptions
|
||||
{
|
||||
protected $__strictMode__ = false; // phpcs:ignore
|
||||
|
||||
private bool $enabled = false;
|
||||
/** @deprecated */
|
||||
private bool $legacyVisitsPublishing = false;
|
||||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
protected function setEnabled(bool $enabled): self
|
||||
{
|
||||
$this->enabled = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
public function legacyVisitsPublishing(): bool
|
||||
{
|
||||
return $this->legacyVisitsPublishing;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
protected function setLegacyVisitsPublishing(bool $legacyVisitsPublishing): self
|
||||
{
|
||||
$this->legacyVisitsPublishing = $legacyVisitsPublishing;
|
||||
return $this;
|
||||
public function __construct(
|
||||
public readonly bool $enabled = false,
|
||||
/** @deprecated */
|
||||
public readonly bool $legacyVisitsPublishing = false,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user