Add signatureExists method to Contact class and remove unused Cryptography import in ContactManager
Some checks are pending
CI / release_executable (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
Some checks are pending
CI / release_executable (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
This commit is contained in:
parent
f80ab103a9
commit
f080775701
2 changed files with 12 additions and 1 deletions
|
@ -8,7 +8,6 @@
|
||||||
use PDO;
|
use PDO;
|
||||||
use PDOException;
|
use PDOException;
|
||||||
use Socialbox\Classes\Configuration;
|
use Socialbox\Classes\Configuration;
|
||||||
use Socialbox\Classes\Cryptography;
|
|
||||||
use Socialbox\Classes\Database;
|
use Socialbox\Classes\Database;
|
||||||
use Socialbox\Classes\Validator;
|
use Socialbox\Classes\Validator;
|
||||||
use Socialbox\Enums\Types\ContactRelationshipType;
|
use Socialbox\Enums\Types\ContactRelationshipType;
|
||||||
|
|
|
@ -89,6 +89,18 @@
|
||||||
return $this->knownKeys;
|
return $this->knownKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function signatureExists(string $signatureUuid): bool
|
||||||
|
{
|
||||||
|
foreach($this->knownKeys as $key)
|
||||||
|
{
|
||||||
|
if($key->getUuid() === $signatureUuid)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the timestamp when the contact was added.
|
* Retrieves the timestamp when the contact was added.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue