We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Without the test added below an error occurs if the number of news in the storage equals 1.
protected function mapResultToObjects(array $result) { $out = $tmp = array(); $count = count($result); if($count > 0) { switch ($count) { case 3: $tmp['prev'] = $result[0]; $tmp['next'] = $result[2]; break; case 2: $tmp['prev'] = $result[0]; break; case 1: $tmp['next'] = $result[0]; break; default: throw new \UnexpectedValueException(sprintf('Unexpected count of "%s" which is not implemented!', $count)); } foreach ($tmp as $_id => $single) { $out[$_id] = $this->getObject($single['uid']); } } return $out; }
The text was updated successfully, but these errors were encountered:
Fixed in meantime
Sorry, something went wrong.
No branches or pull requests
Without the test added below an error occurs if the number of news in the storage equals 1.
The text was updated successfully, but these errors were encountered: