Updated to readonly public props on as many models as possible

This commit is contained in:
Alejandro Celaya
2022-04-23 14:00:47 +02:00
parent e79391907a
commit bca3e62ced
74 changed files with 249 additions and 494 deletions

View File

@@ -8,7 +8,7 @@ use Shlinkio\Shlink\Rest\Entity\ApiKey;
final class ApiKeyCheckResult
{
public function __construct(private ?ApiKey $apiKey = null)
public function __construct(public readonly ?ApiKey $apiKey = null)
{
}
@@ -16,9 +16,4 @@ final class ApiKeyCheckResult
{
return $this->apiKey !== null && $this->apiKey->isValid();
}
public function apiKey(): ?ApiKey
{
return $this->apiKey;
}
}