Renamed ContactRecord to Contact
This commit is contained in:
parent
a1704338c8
commit
05f6661a75
7 changed files with 371 additions and 12 deletions
|
@ -7,7 +7,7 @@
|
|||
use InvalidArgumentException;
|
||||
use Socialbox\Enums\Types\ContactRelationshipType;
|
||||
use Socialbox\Interfaces\SerializableInterface;
|
||||
use Socialbox\Objects\Standard\ContactRecord;
|
||||
use Socialbox\Objects\Standard\Contact;
|
||||
|
||||
class ContactDatabaseRecord implements SerializableInterface
|
||||
{
|
||||
|
@ -126,11 +126,11 @@
|
|||
/**
|
||||
* Converts the object to a standard contact record.
|
||||
*
|
||||
* @return ContactRecord The standard contact record.
|
||||
* @return Contact The standard contact record.
|
||||
*/
|
||||
public function toStandard(): ContactRecord
|
||||
public function toStandard(): Contact
|
||||
{
|
||||
return new ContactRecord([
|
||||
return new Contact([
|
||||
'address' => $this->contactPeerAddress,
|
||||
'relationship' => $this->relationship,
|
||||
'added_timestamp' => $this->created->getTimestamp()
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use Socialbox\Interfaces\SerializableInterface;
|
||||
use Socialbox\Objects\PeerAddress;
|
||||
|
||||
class ContactRecord implements SerializableInterface
|
||||
class Contact implements SerializableInterface
|
||||
{
|
||||
private PeerAddress $address;
|
||||
private ContactRelationshipType $relationship;
|
||||
|
@ -102,7 +102,7 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): ContactRecord
|
||||
public static function fromArray(array $data): Contact
|
||||
{
|
||||
return new self($data);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue