Skip to content

Commit 83760ca

Browse files
chore(emoji): 🔩 🚿Add return types
1 parent 5e4e4b1 commit 83760ca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Emoji.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Emoji {
1010
* Get the Emojis from emoji.php
1111
* @return array
1212
*/
13-
private function getEmojis()
13+
private function getEmojis() : array
1414
{
1515
return require("Emojis/emoji.php");
1616
}
@@ -22,7 +22,7 @@ private function getEmojis()
2222
* @throws \Unicodeveloper\Emoji\Exceptions\IsNull
2323
* @throws \Unicodeveloper\Emoji\Exceptions\UnknownUnicode
2424
*/
25-
public function findByAlias($emojiName = null)
25+
public function findByAlias($emojiName = null) : string
2626
{
2727
if (is_null($emojiName)) {
2828
throw IsNull::create("Please provide the name of the emoji you are looking for");
@@ -43,7 +43,7 @@ public function findByAlias($emojiName = null)
4343
* @param string $emojiName
4444
* @return unicode
4545
*/
46-
public function findByName($emojiName = null)
46+
public function findByName($emojiName = null) : string
4747
{
4848
return $this->findByAlias($emojiName);
4949
}
@@ -55,7 +55,7 @@ public function findByName($emojiName = null)
5555
* @throws \Unicodeveloper\Emoji\Exceptions\IsNull
5656
* @throws \Unicodeveloper\Emoji\Exceptions\UnknownUnicode
5757
*/
58-
public function findByUnicode($unicode = null)
58+
public function findByUnicode($unicode = null) : string
5959
{
6060
if (is_null($unicode)) {
6161
throw IsNull::create("Please provide a valid UTF-8 Unicode value");

src/EmojiServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function register()
4141
* Get the services provided by the provider
4242
* @return array
4343
*/
44-
public function provides()
44+
public function provides() : array
4545
{
4646
return ['laravel-emoji'];
4747
}

src/Facades/Emoji.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Emoji extends Facade {
2020
*
2121
* @return string
2222
*/
23-
protected static function getFacadeAccessor()
23+
protected static function getFacadeAccessor() : string
2424
{
2525
return 'laravel-emoji';
2626
}

0 commit comments

Comments
 (0)