Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f917ed0cb | |||
| c931c55478 | |||
| 00c4ccc601 |
@@ -144,10 +144,12 @@ class VkProvider extends AbstractProvider
|
|||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
protected function getDefaultScopes()
|
|
||||||
|
protected function getDefaultScopes(): array
|
||||||
{
|
{
|
||||||
return $this->scopes;
|
return $this->scopes;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkResponse(ResponseInterface $response, $data): void
|
protected function checkResponse(ResponseInterface $response, $data): void
|
||||||
{
|
{
|
||||||
// Metadata info
|
// Metadata info
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
/**
|
/**
|
||||||
* Helper for getting user data
|
* 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;
|
return !empty($this->response[$key]) ? $this->response[$key] : null;
|
||||||
}
|
}
|
||||||
@@ -67,12 +67,12 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
/**
|
/**
|
||||||
* Short address to user page
|
* Short address to user page
|
||||||
*/
|
*/
|
||||||
public function getDomain(): string
|
public function getDomain(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('domain');
|
return $this->getField('domain');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFirstName(): string
|
public function getFirstName(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('first_name');
|
return $this->getField('first_name');
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
return (bool)$this->getField('has_photo');
|
return (bool)$this->getField('has_photo');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHomeTown(): string
|
public function getHomeTown(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('home_town');
|
return $this->getField('home_town');
|
||||||
}
|
}
|
||||||
@@ -106,17 +106,17 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
return (bool)$this->getField('is_friend');
|
return (bool)$this->getField('is_friend');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLastName(): string
|
public function getLastName(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('last_name');
|
return $this->getField('last_name');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMaidenName(): string
|
public function getMaidenName(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('maiden_name');
|
return $this->getField('maiden_name');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNickname(): string
|
public function getNickname(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('nickname');
|
return $this->getField('nickname');
|
||||||
}
|
}
|
||||||
@@ -128,12 +128,12 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
return $this->getField('photo_max');
|
return $this->getField('photo_max');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPhotoMaxOrig(): string
|
public function getPhotoMaxOrig(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('photo_max_orig');
|
return $this->getField('photo_max_orig');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getScreenName(): string
|
public function getScreenName(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('screen_name');
|
return $this->getField('screen_name');
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ class VkUser implements ResourceOwnerInterface
|
|||||||
return $this->getField('sex');
|
return $this->getField('sex');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmail(): string
|
public function getEmail(): string|null
|
||||||
{
|
{
|
||||||
return $this->getField('email');
|
return $this->getField('email');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user