src/Emoji.php
public function findByUnicode($unicode = null) : string
    {
        if (is_null($unicode)) {
            throw IsNull::create("Please provide a valid UTF-8 Unicode value");
        }

        $emojis = array_flip($this->getEmojis());

        if (! array_key_exists($unicode, $emojis)) {
            throw UnknownUnicode::create($unicode);
        }

        return $emojis[$unicode];
    }
public function findByUnicode($unicode = null) : string
    {
        if (is_null($unicode)) {
            throw IsNull::create("Please provide a valid UTF-8 Unicode value");
        }

        $emojis = array_flip($this->getEmojis());

        if (! array_key_exists($unicode, $emojis)) {
            throw UnknownUnicode::create($unicode);
        }

        return $emojis[$unicode];
    }
public function findByUnicode ( $ unicode = null ) : string { if ( is_null ( $ unicode ) ) { throw IsNull :: create ( "Please provide a valid UTF-8 Unicode value" ) ; } $ emojis = array_flip ( $ this -> getEmojis ( ) ) ; if ( ! array_key_exists ( $ unicode , $ emojis ) ) { throw UnknownUnicode :: create ( $ unicode ) ; } return $ emojis [ $ unicode ] ; }
Get the emoji name by passing the unicode value
@param  string $unicode
@return string
@throws \Unicodeveloper\Emoji\Exceptions\IsNull
@throws \Unicodeveloper\Emoji\Exceptions\UnknownUnicode
Get the emoji name by passing the unicode value