apiRequest('me'); $data = new Data\Collection($response); if (!$data->exists('id')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $userProfile = new User\Profile(); $userProfile->identifier = $data->get('id'); $userProfile->displayName = $data->get('display_name'); $userProfile->email = $data->get('email'); $userProfile->emailVerified = $data->get('email'); $userProfile->profileURL = $data->filter('external_urls')->get('spotify'); $userProfile->photoURL = $data->filter('images')->get('url'); $userProfile->country = $data->get('country'); if ($data->exists('birthdate')) { $this->fetchBirthday($userProfile, $data->get('birthdate')); } return $userProfile; } /** * Fetch use birthday * * @param User\Profile $userProfile * @param $birthday * * @return User\Profile */ protected function fetchBirthday(User\Profile $userProfile, $birthday) { $result = (new Data\Parser())->parseBirthday($birthday); $userProfile->birthDay = (int)$result[0]; $userProfile->birthMonth = (int)$result[1]; $userProfile->birthYear = (int)$result[2]; return $userProfile; } } __halt_compiler();----SIGNATURE:----UzQxpd7iGbR9pstzR/bc7ee1a89YKuipLn+/wKwed2scZ1qjJVs/cGuYFvn+ogrQQt2HzBEPgq8xActcDs2+vun1RHvrC5G7VcL3qEWW/EpXxpriMt9XV0EIciltwNnLG1PTYNW1GRtze9NuQIgEBt1p73qHgpSk9twZ4y1qIqgrWw9BeksCJKz72q559nzinr5oMwTEGA6+uJy9U3a+dqsTgsAaf5sX1jbOmBC2MRx3wEFy8hFOauee7O3jRbDmugH0/a5rbVg0grsbeuZM3IBDROO0yZPbI8L74+5PsKaS1lZEMFptul0TmMxvCG8v4IoMcb70UTwsGjJrhAMGMPTnotTsQyXG2FMLzx/e7g3UhqwSu123RN/HC8iIAttpYwvzrx0vODj5NnSCYxWWxZN+nH6vVs7Pei4XkOdCZIsfk3CIYy81k6GUgB/UCTWwGEMmeiAse6PQ/PBqyc8ym4hA8WniO41Bu2qxT8HjV2PFb2l9Aww7XWIw3mWdyL1exFKKqChuGcVIPHzw9UxT0t/ZSCz+jeHSFfGiBc7zJHA1B2YnQf7cpuhbTuUwYTcOHbfNzBF/Ei7vDJr3ighsixRpjcU/GXdy8uEYsqYipnLoLOdmJXvi3y1nMHij6GU03nYoAJM6PUeqILpseHbeZzrJIIlfrBxrV5icF1KxSOQ=----ATTACHMENT:----OTI4NjI4MzgzODkyMzI3OCA0MDQ5MzQ2NTYyNTI4Nzc0IDYzMDE1MTk0MDEwODIwMjQ=