mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Migrated AppOptions to immutable object
This commit is contained in:
@@ -4,35 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Options;
|
||||
|
||||
use Laminas\Stdlib\AbstractOptions;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
class AppOptions extends AbstractOptions
|
||||
final class AppOptions
|
||||
{
|
||||
private string $name = 'Shlink';
|
||||
private string $version = '3.0.0';
|
||||
|
||||
public function getName(): string
|
||||
public function __construct(public string $name = 'Shlink', public string $version = '3.0.0')
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
protected function setName(string $name): self
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getVersion(): string
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
protected function setVersion(string $version): self
|
||||
{
|
||||
$this->version = $version;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
|
||||
Reference in New Issue
Block a user