/** * {@inheritdoc} */ public function getNewUsers(Phone $from = null, $count = null) { $response = $this->prepareRequest(Http::GET, $this->getUrl(self::NEW_USERS, ['from' => $from ? $from->getValue() : null, 'count' => $count ?: null]))->send(); $data = $this->getSuccessData($response); $result = []; foreach ($data as $phoneValue) { $user = new User(); $result[] = $user->setPhone(Phone::createFromString($phoneValue)); } return $result; }