mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 12:13:13 +08:00
28 lines
477 B
PHP
28 lines
477 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest\Service;
|
|
|
|
use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
|
|
|
final class ApiKeyCheckResult
|
|
{
|
|
private ?ApiKey $apiKey;
|
|
|
|
public function __construct(?ApiKey $apiKey = null)
|
|
{
|
|
$this->apiKey = $apiKey;
|
|
}
|
|
|
|
public function isValid(): bool
|
|
{
|
|
return $this->apiKey !== null && $this->apiKey->isValid();
|
|
}
|
|
|
|
public function apiKey(): ?ApiKey
|
|
{
|
|
return $this->apiKey;
|
|
}
|
|
}
|