Permalink
Browse files

Added #word() to Lorem.

  • Loading branch information...
1 parent 1f228b4 commit d433752dc0fbd611a77f41a82e71721b66b53aff @jjbohn jjbohn committed Dec 29, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/Faker/Lorem.php
View
@@ -20,6 +20,19 @@
abstract class Lorem extends Faker
{
/**
+ * Return a random "lorem ipsum" word.
+ *
+ * @access public
+ * @static
+ * @return string Word
+ */
+ public static function word()
+ {
+ $words = self::words(1);
+ return reset($words);
+ }
+
+ /**
* Return random "lorem ipsum" words.
*
* @access public

0 comments on commit d433752

Please sign in to comment.