Skip to content

Commit

Permalink
Switched to using range()
Browse files Browse the repository at this point in the history
  • Loading branch information
Caius Durling committed May 16, 2008
1 parent d5fb987 commit c21f322
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions faker.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function random( &$array )
*/
protected function rand_num()
{
$a = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 );
$a = range( 0, 9 );
return $this->random( $a );
}

Expand All @@ -65,11 +65,7 @@ protected function rand_num()
*/
protected function rand_letter()
{
$a = array(
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'
);
$a = range( 'a', 'z' );
return $this->random( $a );
}

Expand Down

0 comments on commit c21f322

Please sign in to comment.