|
|
|
|
@@ -35,7 +35,7 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
/**
|
|
|
|
|
* Helper for getting user data
|
|
|
|
|
*/
|
|
|
|
|
protected function getField(string $key): mixed|null
|
|
|
|
|
protected function getField(string $key): mixed
|
|
|
|
|
{
|
|
|
|
|
return !empty($this->response[$key]) ? $this->response[$key] : null;
|
|
|
|
|
}
|
|
|
|
|
@@ -67,12 +67,12 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
/**
|
|
|
|
|
* Short address to user page
|
|
|
|
|
*/
|
|
|
|
|
public function getDomain(): string
|
|
|
|
|
public function getDomain(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('domain');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getFirstName(): string
|
|
|
|
|
public function getFirstName(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('first_name');
|
|
|
|
|
}
|
|
|
|
|
@@ -93,7 +93,7 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
return (bool)$this->getField('has_photo');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getHomeTown(): string
|
|
|
|
|
public function getHomeTown(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('home_town');
|
|
|
|
|
}
|
|
|
|
|
@@ -106,17 +106,17 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
return (bool)$this->getField('is_friend');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getLastName(): string
|
|
|
|
|
public function getLastName(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('last_name');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getMaidenName(): string
|
|
|
|
|
public function getMaidenName(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('maiden_name');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getNickname(): string
|
|
|
|
|
public function getNickname(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('nickname');
|
|
|
|
|
}
|
|
|
|
|
@@ -128,12 +128,12 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
return $this->getField('photo_max');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getPhotoMaxOrig(): string
|
|
|
|
|
public function getPhotoMaxOrig(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('photo_max_orig');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getScreenName(): string
|
|
|
|
|
public function getScreenName(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('screen_name');
|
|
|
|
|
}
|
|
|
|
|
@@ -143,7 +143,7 @@ class VkUser implements ResourceOwnerInterface
|
|
|
|
|
return $this->getField('sex');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getEmail(): string
|
|
|
|
|
public function getEmail(): string|null
|
|
|
|
|
{
|
|
|
|
|
return $this->getField('email');
|
|
|
|
|
}
|
|
|
|
|
|