Skip to content

Commit

Permalink
Drop PHP 5.4 and 5.5 support (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bensinclair authored and joshmcrae committed Jul 15, 2019
1 parent 309b1ac commit a49bcfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["php-emoji", "emoji"],
"license": "MIT",
"require": {
"php": ">=5.4"
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "^5.0",
Expand Down
10 changes: 3 additions & 7 deletions src/LitEmoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,10 @@ private static function getShortcodes()
return self::$shortcodes;
}

$data = require(__DIR__ . '/shortcodes-array.php');

// Skip excluded shortcodes
foreach ($data as $code => $codepoint) {
if (!in_array($code, self::$excludedShortcodes)) {
self::$shortcodes[$code] = $codepoint;
}
}
self::$shortcodes = array_filter(require(__DIR__ . '/shortcodes-array.php'), function($code) {
return !in_array($code, self::$excludedShortcodes);
}, ARRAY_FILTER_USE_KEY);

return self::$shortcodes;
}
Expand Down

0 comments on commit a49bcfd

Please sign in to comment.