mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Migrated all constructor props to property promotion when possible
This commit is contained in:
@@ -9,11 +9,8 @@ use Shlinkio\Shlink\Common\Entity\AbstractEntity;
|
||||
|
||||
class Domain extends AbstractEntity implements JsonSerializable
|
||||
{
|
||||
private string $authority;
|
||||
|
||||
public function __construct(string $authority)
|
||||
public function __construct(private string $authority)
|
||||
{
|
||||
$this->authority = $authority;
|
||||
}
|
||||
|
||||
public function getAuthority(): string
|
||||
|
||||
@@ -10,12 +10,10 @@ use Shlinkio\Shlink\Common\Entity\AbstractEntity;
|
||||
|
||||
class Tag extends AbstractEntity implements JsonSerializable
|
||||
{
|
||||
private string $name;
|
||||
private Collections\Collection $shortUrls;
|
||||
|
||||
public function __construct(string $name)
|
||||
public function __construct(private string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->shortUrls = new Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user