mirror of
https://github.com/jawira/emoji-catalog.git
synced 2023-08-10 21:12:49 +03:00
Added docblock to Emoji class #2
Builfile wasn't improved as requested by ticket, however Emoji class has docblock with more details about Emoji.
This commit is contained in:
parent
3f24716d6a
commit
5f5971badb
@ -1,16 +1,83 @@
|
|||||||
<component name="ProjectDictionaryState">
|
<component name="ProjectDictionaryState">
|
||||||
<dictionary name="jawira">
|
<dictionary name="jawira">
|
||||||
<words>
|
<words>
|
||||||
|
<w>barthelemy</w>
|
||||||
|
<w>barthélemy</w>
|
||||||
|
<w>bento</w>
|
||||||
|
<w>biohazard</w>
|
||||||
|
<w>blowfish</w>
|
||||||
|
<w>bouvet</w>
|
||||||
<w>buildfile</w>
|
<w>buildfile</w>
|
||||||
|
<w>burkina</w>
|
||||||
|
<w>cableway</w>
|
||||||
|
<w>caicos</w>
|
||||||
|
<w>ceuta</w>
|
||||||
|
<w>clipperton</w>
|
||||||
|
<w>cunha</w>
|
||||||
|
<w>curaçao</w>
|
||||||
|
<w>czechia</w>
|
||||||
|
<w>côte</w>
|
||||||
|
<w>dango</w>
|
||||||
|
<w>dharma</w>
|
||||||
|
<w>divoire</w>
|
||||||
|
<w>diya</w>
|
||||||
<w>emojis</w>
|
<w>emojis</w>
|
||||||
|
<w>eswatini</w>
|
||||||
|
<w>facepalming</w>
|
||||||
|
<w>falafel</w>
|
||||||
|
<w>faroe</w>
|
||||||
|
<w>faso</w>
|
||||||
|
<w>flatbread</w>
|
||||||
|
<w>futuna</w>
|
||||||
|
<w>gbeng</w>
|
||||||
|
<w>gbsct</w>
|
||||||
|
<w>gbwls</w>
|
||||||
<w>gitattributes</w>
|
<w>gitattributes</w>
|
||||||
<w>gitignore</w>
|
<w>gitignore</w>
|
||||||
|
<w>hong</w>
|
||||||
|
<w>ivoire</w>
|
||||||
<w>jawira</w>
|
<w>jawira</w>
|
||||||
|
<w>keycap</w>
|
||||||
|
<w>kitts</w>
|
||||||
|
<w>kosovo</w>
|
||||||
|
<w>lanka</w>
|
||||||
|
<w>leste</w>
|
||||||
|
<w>maarten</w>
|
||||||
|
<w>mahjong</w>
|
||||||
|
<w>marino</w>
|
||||||
|
<w>mayen</w>
|
||||||
|
<w>mayotte</w>
|
||||||
|
<w>melilla</w>
|
||||||
|
<w>mens</w>
|
||||||
|
<w>merperson</w>
|
||||||
|
<w>miquelon</w>
|
||||||
|
<w>moai</w>
|
||||||
|
<w>nazar</w>
|
||||||
|
<w>niue</w>
|
||||||
|
<w>oclock</w>
|
||||||
|
<w>oden</w>
|
||||||
<w>oneline</w>
|
<w>oneline</w>
|
||||||
|
<w>palau</w>
|
||||||
|
<w>papua</w>
|
||||||
|
<w>petri</w>
|
||||||
<w>phing</w>
|
<w>phing</w>
|
||||||
<w>plantuml</w>
|
<w>plantuml</w>
|
||||||
|
<w>príncipe</w>
|
||||||
|
<w>réunion</w>
|
||||||
|
<w>selfie</w>
|
||||||
|
<w>sint</w>
|
||||||
<w>smilies</w>
|
<w>smilies</w>
|
||||||
|
<w>spoked</w>
|
||||||
|
<w>supervillain</w>
|
||||||
<w>symplify</w>
|
<w>symplify</w>
|
||||||
|
<w>tanabata</w>
|
||||||
|
<w>timor</w>
|
||||||
|
<w>tokelau</w>
|
||||||
|
<w>tomé</w>
|
||||||
|
<w>womans</w>
|
||||||
|
<w>womens</w>
|
||||||
|
<w>zealand</w>
|
||||||
|
<w>åland</w>
|
||||||
</words>
|
</words>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</component>
|
</component>
|
36
CHANGELOG.md
36
CHANGELOG.md
@ -1,7 +1,4 @@
|
|||||||
Changelog
|
# Changelog
|
||||||
=========
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
### Added
|
### Added
|
||||||
@ -12,32 +9,23 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Security
|
### Security
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Unreleased
|
## Unreleased
|
||||||
----------
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Added a change
|
- [#2] Added docblock with _name_ and _code point_ to all constants.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- [#2] Constant `Emoji::LAPTOP_COMPUTER` was changed to `Emoji::LAPTOP`.
|
||||||
|
- [#2] Constant `Emoji::FLAG_ENGLAND` was changed to `Emoji::FLAG_GBENG`.
|
||||||
|
- [#2] Constant `Emoji::FLAG_SCOTLAND` was changed to `Emoji::FLAG_GBSCT`.
|
||||||
|
- [#2] Constant `Emoji::FLAG_WALES` was changed to `Emoji::FLAG_GBWLS`.
|
||||||
|
|
||||||
<!---
|
## [v0.0.0] - 2019-08-30
|
||||||
Guiding Principles
|
|
||||||
|
|
||||||
Changelogs are for humans, not machines.
|
### Added
|
||||||
There should be an entry for every single version.
|
|
||||||
The same types of changes should be grouped.
|
|
||||||
Versions and sections should be linkable.
|
|
||||||
The latest version comes first.
|
|
||||||
The release date of each versions is displayed.
|
|
||||||
Mention whether you follow Semantic Versioning.
|
|
||||||
|
|
||||||
Types of changes
|
- First working version.
|
||||||
|
|
||||||
### Added for new features.
|
[#2]: https://github.com/jawira/emoji-catalo/pull/2
|
||||||
### Changed for changes in existing functionality.
|
|
||||||
### Deprecated for soon-to-be removed features.
|
|
||||||
### Removed for now removed features.
|
|
||||||
### Fixed for any bug fixes.
|
|
||||||
### Security in case of vulnerabilities.
|
|
||||||
-->
|
|
||||||
|
@ -5,9 +5,9 @@ Get access to +3000 emojis as class constants.
|
|||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
- 🍰 Really easy to use
|
- 🍰 Dead easy to use
|
||||||
- 🔓 Zero dependencies
|
|
||||||
- 🤩 A lot of emojis
|
- 🤩 A lot of emojis
|
||||||
|
- 🔓 Zero dependencies
|
||||||
|
|
||||||
[![Latest Stable Version](https://poser.pugx.org/jawira/emoji-catalog/v/stable)](https://packagist.org/packages/jawira/emoji-catalog)
|
[![Latest Stable Version](https://poser.pugx.org/jawira/emoji-catalog/v/stable)](https://packagist.org/packages/jawira/emoji-catalog)
|
||||||
![Emoji](https://img.shields.io/badge/Emoji-v12.0-%235354FE)
|
![Emoji](https://img.shields.io/badge/Emoji-v12.0-%235354FE)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php /** @noinspection PhpUnused */
|
||||||
|
|
||||||
|
namespace Jawira\EmojiCatalog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Emoji
|
* Class Emoji
|
||||||
@ -6,9 +8,7 @@
|
|||||||
* Get access to all emojis as class constants.
|
* Get access to all emojis as class constants.
|
||||||
*
|
*
|
||||||
* @package Jawira\EmojiCatalog
|
* @package Jawira\EmojiCatalog
|
||||||
* @author Jawira Portugal <dev@tugal.be>
|
* @author Jawira Portugal <dev@tugal.be>
|
||||||
*/
|
*/
|
||||||
namespace Jawira\EmojiCatalog;
|
|
||||||
|
|
||||||
class Emoji
|
class Emoji
|
||||||
{
|
{
|
||||||
|
@ -5,21 +5,41 @@
|
|||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:for-each select="//table//tr[./td//img]">
|
<xsl:for-each select="//table//tr[./td//img]">
|
||||||
<xsl:text> const </xsl:text>
|
<xsl:text> /** </xsl:text>
|
||||||
|
<xsl:text> * </xsl:text>
|
||||||
<xsl:call-template name="get-name"/>
|
<xsl:call-template name="get-name"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
<xsl:text> * </xsl:text>
|
||||||
|
<xsl:text> * Code point(s): </xsl:text>
|
||||||
|
<xsl:call-template name="get-code"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
<xsl:text> */ </xsl:text>
|
||||||
|
<xsl:text> const </xsl:text>
|
||||||
|
<xsl:call-template name="get-constant-name"/>
|
||||||
<xsl:text> = "</xsl:text>
|
<xsl:text> = "</xsl:text>
|
||||||
<xsl:call-template name="get-alt"/>
|
<xsl:call-template name="get-alt"/>
|
||||||
<xsl:text>"; </xsl:text>
|
<xsl:text>"; </xsl:text>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="get-code">
|
||||||
|
<xsl:value-of select="./td[2]//a/text()"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="get-name">
|
||||||
|
<xsl:variable name="short-name" select="./td[last()]/text()"/>
|
||||||
|
<xsl:variable name="removable" select="'⊛⊖'"/>
|
||||||
|
<xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/>
|
||||||
|
<xsl:value-of select="normalize-space($cleaned)"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="get-alt">
|
<xsl:template name="get-alt">
|
||||||
<xsl:value-of select="./td[3]/text()"/>
|
<xsl:value-of select="./td[3]/text()"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="get-name">
|
<xsl:template name="get-constant-name">
|
||||||
<xsl:variable name="short-name" select="./td[last()]/text()"/>
|
<xsl:variable name="short-name" select="./td[last()]/text()"/>
|
||||||
<xsl:variable name="removable" select="':;.,⊛’!“”()'"/>
|
<xsl:variable name="removable" select="':;.,⊛’!“”()⊖'"/>
|
||||||
<xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/>
|
<xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/>
|
||||||
<xsl:variable name="lowercase" select="'Åãabcçdeéfghíijklmnoôpqrstuvwxyz-&'"/>
|
<xsl:variable name="lowercase" select="'Åãabcçdeéfghíijklmnoôpqrstuvwxyz-&'"/>
|
||||||
<xsl:variable name="uppercase" select="'AAABCCDEEFGHIIJKLMNOOPQRSTUVWXYZ N'"/>
|
<xsl:variable name="uppercase" select="'AAABCCDEEFGHIIJKLMNOOPQRSTUVWXYZ N'"/>
|
||||||
|
18130
src/Emoji.php
18130
src/Emoji.php
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user