Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Refactored to work with PHP 5
Browse files Browse the repository at this point in the history
  • Loading branch information
jessfdm-codes committed Mar 27, 2017
1 parent 62b87b5 commit bca3cbe
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/Faker/Provider/Miscellaneous.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ class Miscellaneous extends Base
* @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
* On date of 2017-03-26
*
* U+1F600 - U+1F637
* U+1F600 - U+1F637 as their UTF-8 Pairings
*/
protected static $emoji = array(
"\u{1F600}", "\u{1F601}", "\u{1F602}", "\u{1F603}", "\u{1F604}",
"\u{1F605}", "\u{1F606}", "\u{1F607}", "\u{1F608}", "\u{1F609}",
"\u{1F60A}", "\u{1F60B}", "\u{1F60C}", "\u{1F60D}", "\u{1F60E}",
"\u{1F60F}", "\u{1F610}", "\u{1F611}", "\u{1F612}", "\u{1F613}",
"\u{1F614}", "\u{1F615}", "\u{1F616}", "\u{1F617}", "\u{1F618}",
"\u{1F619}", "\u{1F61A}", "\u{1F61B}", "\u{1F61C}", "\u{1F61D}",
"\u{1F61E}", "\u{1F61F}", "\u{1F620}", "\u{1F621}", "\u{1F622}",
"\u{1F623}", "\u{1F624}", "\u{1F625}", "\u{1F626}", "\u{1F627}",
"\u{1F628}", "\u{1F629}", "\u{1F62A}", "\u{1F62B}", "\u{1F62C}",
"\u{1F62D}", "\u{1F62E}", "\u{1F62F}", "\u{1F630}", "\u{1F631}",
"\u{1F632}", "\u{1F633}", "\u{1F634}", "\u{1F635}", "\u{1F636}",
"\u{1F637}",
'\uD83D\uDE00', '\uD83D\uDE01', '\uD83D\uDE02', '\uD83D\uDE03',
'\uD83D\uDE04', '\uD83D\uDE05', '\uD83D\uDE06', '\uD83D\uDE07',
'\uD83D\uDE08', '\uD83D\uDE09', '\uD83D\uDE0A', '\uD83D\uDE0B',
'\uD83D\uDE0C', '\uD83D\uDE0D', '\uD83D\uDE0E', '\uD83D\uDE0F',
'\uD83D\uDE10', '\uD83D\uDE11', '\uD83D\uDE12', '\uD83D\uDE13',
'\uD83D\uDE14', '\uD83D\uDE15', '\uD83D\uDE16', '\uD83D\uDE17',
'\uD83D\uDE18', '\uD83D\uDE19', '\uD83D\uDE1A', '\uD83D\uDE1B',
'\uD83D\uDE1C', '\uD83D\uDE1D', '\uD83D\uDE1E', '\uD83D\uDE1F',
'\uD83D\uDE20', '\uD83D\uDE21', '\uD83D\uDE22', '\uD83D\uDE23',
'\uD83D\uDE24', '\uD83D\uDE25', '\uD83D\uDE26', '\uD83D\uDE27',
'\uD83D\uDE28', '\uD83D\uDE29', '\uD83D\uDE2A', '\uD83D\uDE2B',
'\uD83D\uDE2C', '\uD83D\uDE2D', '\uD83D\uDE2E', '\uD83D\uDE2F',
'\uD83D\uDE30', '\uD83D\uDE31', '\uD83D\uDE32', '\uD83D\uDE33',
'\uD83D\uDE34', '\uD83D\uDE35', '\uD83D\uDE36', '\uD83D\uDE37',
);

/**
Expand Down Expand Up @@ -313,6 +315,6 @@ public static function currencyCode()
*/
public static function emoji()
{
return static::randomElement(static::$emoji);
return json_decode('"' . static::randomElement(static::$emoji) . '"');
}
}

0 comments on commit bca3cbe

Please sign in to comment.