Files
shlink/module/Rest/src/Service/ApiKeyCheckResult.php
2024-11-05 11:26:39 +01:00

20 lines
353 B
PHP

<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Rest\Service;
use Shlinkio\Shlink\Rest\Entity\ApiKey;
final readonly class ApiKeyCheckResult
{
public function __construct(public ApiKey|null $apiKey = null)
{
}
public function isValid(): bool
{
return $this->apiKey !== null && $this->apiKey->isValid();
}
}