The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 758fb42b authored by Demian Katz's avatar Demian Katz
Browse files

Removed unused variables.

parent 87f55986
No related merge requests found
...@@ -205,7 +205,6 @@ class Service ...@@ -205,7 +205,6 @@ class Service
public function random($backend, $query, $limit = 20, $params = null) public function random($backend, $query, $limit = 20, $params = null)
{ {
$params = $params ?: new ParamBag(); $params = $params ?: new ParamBag();
$backendString = $backend;
$context = __FUNCTION__; $context = __FUNCTION__;
$args = compact('backend', 'query', 'limit', 'params', 'context'); $args = compact('backend', 'query', 'limit', 'params', 'context');
$backend = $this->resolve($backend, $args); $backend = $this->resolve($backend, $args);
...@@ -249,7 +248,6 @@ class Service ...@@ -249,7 +248,6 @@ class Service
// Default case: retrieve n random records: // Default case: retrieve n random records:
$response = false; $response = false;
$retrievedIndexes = array(); $retrievedIndexes = array();
$retrievedRecordIds = array();
for ($i = 0; $i < $limit; $i++) { for ($i = 0; $i < $limit; $i++) {
$nextIndex = rand(0, $total_records - 1); $nextIndex = rand(0, $total_records - 1);
while (in_array($nextIndex, $retrievedIndexes)) { while (in_array($nextIndex, $retrievedIndexes)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment