From 9726937ca7f7cd8529edac5fde9e6eed870ac11e Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 8 Aug 2016 09:37:51 -0400
Subject: [PATCH] Code simplification. - srand() served no real purpose here
 (randomization is automatic anyway; no compelling reason to specifically use
 a time-based seed for Demo purposes) - perfect situation for use of
 array_map()

---
 module/VuFind/src/VuFind/ILS/Driver/Demo.php | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php
index 1f1d5400ee9..68c6abdd951 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php
@@ -586,14 +586,7 @@ class Demo extends AbstractBase
      */
     public function getStatuses($ids)
     {
-        // Random Seed
-        srand(time());
-
-        $status = [];
-        foreach ($ids as $id) {
-            $status[] = $this->getStatus($id);
-        }
-        return $status;
+        return array_map([$this, 'getStatus'], $ids);
     }
 
     /**
-- 
GitLab