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:----H57P/7hjSqnfzDe9uCxxK8WaLhAWF6ErfUCvNnA7urJngwZL8wtcNtgr8uBBZQGl+xmD8bMBmWe5EGZR4iZLupu2R7Tr1028XOICSw4b5SD3vG++AkhaT9ltM6kigKHIbkpXc2Wi1YRR45ChWTRXYRXKAdqUhuFb6AU40e/AmCyTPWtluGYzR6aGOsL+kGhWHQ0E9lDNC+dvbQfIloWLbXUN5ouMCJsbSBaeebvx8TwFGsVzuKnS/l9zgPEyaHpuBSeESeL3FYKV1ZEuW4f6FHgTz38fcGo2DdS7XDwfIHxcXlRzGTmXsE4z5IW9eb+4czPS1KzDOlX2qSZBORAimRXF1z4Rn+RnfUmPvklks9/+zjzGZZWApuvscIQdBUTpVrTAKWbMim3ZgrdikdCXn7O7uMASFc9vWlKk9LwPN8f0HVc9u03MhUmdwt5gIgi0hQJmYOuPwdEwAUKNta8ihlgjQpBbhxY4NKg5mnj7EuH/KnRNLuuXCKudb7Iu9NPLgNVZwmsI7VIjQpE7SzfL4OdnDTvWuQn5BLNXhv0dfDIFcFZY1VxOvtHjK5MUOGNbQsZTc3pPbou7IxqiXO/Xhn4532DQ0Y/1oGEz/oqgYMAWqkFuiiWaSbi9MY6V+a14kiqFRa8hVEBQUk2MMQWcV7GwzHB8bxwKlNkdz5t+vuk=----ATTACHMENT:----MjY5NjE3NjM1MDg3NTIxOCAxMDgzNzg4NjA3NTc1NzI1IDIzMzQ1NTQwNTQ5Njk4NjQ=