diff --git a/src/Zizaco/FactoryMuff/Kind/Integer.php b/src/Zizaco/FactoryMuff/Kind/Integer.php index 4de0b0f..871e9dc 100644 --- a/src/Zizaco/FactoryMuff/Kind/Integer.php +++ b/src/Zizaco/FactoryMuff/Kind/Integer.php @@ -9,17 +9,6 @@ class Integer extends Kind public function generate() { $length = (int) $this->getOption(0, 5); - - return $this->randomNumber($length); - } - - private function randomNumber($length) - { - $integer = null; - for ($i = 0; $i < $length; $i++) { - $integer .= mt_rand(1, 9); - } - - return (int) $integer; + return $this->faker->randomNumber($length, true); } } diff --git a/src/Zizaco/FactoryMuff/Kind/String.php b/src/Zizaco/FactoryMuff/Kind/String.php index 0ea9c50..4590547 100644 --- a/src/Zizaco/FactoryMuff/Kind/String.php +++ b/src/Zizaco/FactoryMuff/Kind/String.php @@ -9,11 +9,6 @@ class String extends Kind public function generate() { $length = $this->getOption(0, 10); - - // Generate a large amount of text. The reason for this is that - // faker uses a maximum length, and not an exact length. We then substr this - $text = str_replace(' ', null, $this->faker->text($length * 3)); - - return substr($text, 0, $length); + return $this->faker->lexify(str_repeat('?', $length)); } }