Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added #word() to Lorem.

  • Loading branch information...
commit d433752dc0fbd611a77f41a82e71721b66b53aff 1 parent 1f228b4
@jjbohn jjbohn authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/Faker/Lorem.php
View
13 src/Faker/Lorem.php
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.