Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
57 | 2 | public function getEmojis() |
|
58 | { |
||
59 | 2 | $cacheKey = sprintf('%s.emojis', self::CACHE_KEY_PREFIX); |
|
60 | |||
61 | 2 | if ($emojis = $this->cache->fetch($cacheKey)) { |
|
62 | 1 | return $emojis; |
|
63 | } |
||
64 | |||
65 | 1 | $emojis = $this->client->emojis(['include' => 'all'])['emojis']; |
|
66 | 1 | $this->cache->save($cacheKey, $emojis); |
|
67 | |||
68 | 1 | return $emojis; |
|
69 | } |
||
71 |