Files
kupshop/bundles/KupShop/UserOauthBundle/Response/AmazonPathUserResponse.php
2025-08-02 16:30:27 +02:00

23 lines
453 B
PHP

<?php
declare(strict_types=1);
namespace KupShop\UserOauthBundle\Response;
use HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse;
class AmazonPathUserResponse extends PathUserResponse
{
public function getFirstName()
{
return explode(' ', $this->getData()['name'])[0] ?? '';
}
public function getLastName()
{
$lastName = explode(' ', $this->getData()['name']);
return end($lastName) ?? '';
}
}