From 6a115305a6892c13a4cfb9e0f54f85a8e1fa2b67 Mon Sep 17 00:00:00 2001 From: raphi Date: Fri, 17 Apr 2015 09:37:09 +0000 Subject: [PATCH] Fix Usage of a function in loops should be avoided --- src/CardCreator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CardCreator.php b/src/CardCreator.php index ec6c7a3..f05cdfd 100644 --- a/src/CardCreator.php +++ b/src/CardCreator.php @@ -42,7 +42,8 @@ class CardCreator $seed = $this->configration->seed; mt_srand($seed); - for ($i = 0; $i < strlen($this->configration->keys); $i++) { + $number_of_keys = strlen($this->configration->keys); + for ($i = 0; $i < $number_of_keys; $i++) { $prefix = '$' . ($i+1); $equivalent = $chars[mt_rand(0, $char_count-1)];